home *** CD-ROM | disk | FTP | other *** search
/ Game Programming in C++ - Start to Finish / GameProgrammingS.iso / developer_install / CEGUISDK-0.4.1-VC6-STLport.exe / {app} / include / CEGUIWindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-11-17  |  123.4 KB  |  3,962 lines

  1. /************************************************************************
  2.     filename:     CEGUIWindow.h
  3.     created:    21/2/2004
  4.     author:        Paul D Turner
  5.     
  6.     purpose:    Defines abstract base class for Window objects
  7. *************************************************************************/
  8. /*************************************************************************
  9.     Crazy Eddie's GUI System (http://www.cegui.org.uk)
  10.     Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
  11.  
  12.     This library is free software; you can redistribute it and/or
  13.     modify it under the terms of the GNU Lesser General Public
  14.     License as published by the Free Software Foundation; either
  15.     version 2.1 of the License, or (at your option) any later version.
  16.  
  17.     This library is distributed in the hope that it will be useful,
  18.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  19.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  20.     Lesser General Public License for more details.
  21.  
  22.     You should have received a copy of the GNU Lesser General Public
  23.     License along with this library; if not, write to the Free Software
  24.     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  25. *************************************************************************/
  26. #ifndef _CEGUIWindow_h_
  27. #define _CEGUIWindow_h_
  28.  
  29. #include "CEGUIBase.h"
  30. #include "CEGUIString.h"
  31. #include "CEGUIVector.h"
  32. #include "CEGUIRect.h"
  33. #include "CEGUISize.h"
  34. #include "CEGUIEventSet.h"
  35. #include "CEGUIPropertySet.h"
  36. #include "CEGUISystem.h"
  37. #include "CEGUIInputEvent.h"
  38. #include "CEGUIWindowProperties.h"
  39. #include "CEGUIUDim.h"
  40. #include "CEGUIRenderCache.h"
  41. #include <vector>
  42.  
  43.  
  44. #if defined(_MSC_VER)
  45. #    pragma warning(push)
  46. #    pragma warning(disable : 4251)
  47. #endif
  48.  
  49.  
  50. // Start of CEGUI namespace section
  51. namespace CEGUI
  52. {
  53.  
  54. /*!
  55. \brief
  56.     Mode used for Window size and position metrics.
  57.  
  58.     Position information for a Window is always 'relative' to it's parent even in Absolute mode.
  59.     In Relative mode, layout is maintained for different screen resolutions, and also  offers the
  60.     ability for child windows to properly adjust their layout as their parent is sized.
  61. */
  62. enum MetricsMode
  63. {
  64.     Relative,        //!< Metrics are specified as a decimal fraction of parent Window size.
  65.     Absolute,        //!< Metrics are specified as whole pixels.
  66.     Inherited        //!< Metrics are inherited from parent.
  67. };
  68.  
  69. /*!
  70. \brief
  71.     Enumerated type used when specifying vertical alignments.
  72.  */
  73. enum VerticalAlignment
  74. {
  75.     VA_TOP,        //!< Elements position specifies an offset of it's top edge from the top edge of it's parent.
  76.     VA_CENTRE,     //!< Elements position specifies an offset of it's vertical centre from the vertical centre of it's parent.
  77.     VA_BOTTOM      //!< Elements position specifies an offset of it's bottom edge from the bottom edge of it's parent.
  78. };
  79.  
  80. /*!
  81. \brief
  82.     Enumerated type used when specifying horizontal alignments.
  83.  */
  84. enum HorizontalAlignment
  85. {
  86.     HA_LEFT,        //!< Elements position specifies an offset of it's left edge from the left edge of it's parent.
  87.     HA_CENTRE,      //!< Elements position specifies an offset of it's horizontal centre from the horizontal centre of it's parent.
  88.     HA_RIGHT        //!< Elements position specifies an offset of it's right edge from the right edge of it's parent.
  89. };
  90.  
  91. /*!
  92. \brief
  93.     An abstract base class providing common functionality and specifying the required interface for derived classes.
  94.  
  95.     The Window base class is the only UI object class that the core of the system knows about, for this reason every
  96.     other window, widget, or similar item within the system must be derived from Window.  The base class provides the
  97.     common functionality required by all UI objects, and specifies the minimal interface required to be implemented by
  98.     derived classes.
  99. */
  100. class CEGUIEXPORT Window : public PropertySet, public EventSet
  101. {
  102. public:
  103.     static const String EventNamespace;                //!< Namespace for global events
  104.  
  105.     /*************************************************************************
  106.         Event name constants
  107.     *************************************************************************/
  108.     // generated internally by Window
  109.     static const String EventParentSized;                //!< Parent of this Window has been re-sized.
  110.     static const String EventSized;                    //!< Window size has changed
  111.     static const String EventMoved;                    //!< Window position has changed
  112.     static const String EventTextChanged;                //!< Text string for the Window has changed
  113.     static const String EventFontChanged;                //!< Font object for the Window has been changed
  114.     static const String EventAlphaChanged;            //!< Alpha blend value for the Window has changed
  115.     static const String EventIDChanged;                //!< Client assigned ID code for the Window has changed
  116.     static const String EventActivated;                //!< Window has been activated (has input focus)
  117.     static const String EventDeactivated;                //!< Window has been deactivated (loses input focus)
  118.     static const String EventShown;                    //!< Window has been made visible
  119.     static const String EventHidden;                    //!< Window has been hidden from view
  120.     static const String EventEnabled;                    //!< Window has been enabled (interaction is possible)
  121.     static const String EventDisabled;                //!< Window has been disabled (interaction is no longer possible)
  122.     static const String EventMetricsModeChanged;        //!< Active metrics mode has been modified
  123.     static const String EventClippedByParentChanged;    //!< Clipping by parent mode has been modified
  124.     static const String EventDestroyedByParentChanged;//!< Destruction by parent mode has been modified
  125.     static const String EventInheritsAlphaChanged;    //!< Alpha inherited from parent mode has been modified.
  126.     static const String EventAlwaysOnTopChanged;        //!< Always on top mode has been modified
  127.     static const String EventInputCaptureGained;        //!< Window has captured all inputs
  128.     static const String EventInputCaptureLost;        //!< Window has lost it's capture on inputs
  129.     static const String EventRenderingStarted;        //!< Rendering of the Window has started
  130.     static const String EventRenderingEnded;            //!< Rendering for the Window has finished
  131.     static const String EventChildAdded;                //!< A child Window has been added
  132.     static const String EventChildRemoved;            //!< A child window has been removed
  133.     static const String EventDestructionStarted;        //!< Destruction of the Window is about to begin.
  134.     static const String EventZOrderChanged;            //!< The z-order of the window has changed
  135.     static const String EventDragDropItemEnters;    //!< A DragContainer has been dragged over this window.
  136.     static const String EventDragDropItemLeaves;    //!< A DragContainer has left this window.
  137.     static const String EventDragDropItemDropped;    //!< A DragContainer was dropped on this Window.
  138.     static const String EventVerticalAlignmentChanged;    //!< The vertical alignment of the window has changed.
  139.     static const String EventHorizontalAlignmentChanged;  //!< The vertical alignment of the window has changed.
  140.  
  141.     // generated externally (inputs)
  142.     static const String EventMouseEnters;                //!< Mouse cursor has entered the Window.
  143.     static const String EventMouseLeaves;                //!< Mouse cursor has left the Window.
  144.     static const String EventMouseMove;                //!< Mouse cursor was moved within the area of the Window.
  145.     static const String EventMouseWheel;                //!< Mouse wheel was scrolled within the Window.
  146.     static const String EventMouseButtonDown;            //!< A mouse button was pressed down within the Window.
  147.     static const String EventMouseButtonUp;            //!< A mouse button was released within the Window.
  148.     static const String EventMouseClick;                //!< A mouse button was clicked (down then up) within the Window.
  149.     static const String EventMouseDoubleClick;        //!< A mouse button was double-clicked within the Window.
  150.     static const String EventMouseTripleClick;        //!< A mouse button was triple-clicked within the Window.
  151.     static const String EventKeyDown;                    //!< A key on the keyboard was pressed.
  152.     static const String EventKeyUp;                    //!< A key on the keyboard was released.
  153.     static const String EventCharacterKey;            //!< A text character was typed on the keyboard.
  154.  
  155.  
  156.     /*************************************************************************
  157.         Construction and Destruction
  158.     *************************************************************************/
  159.     /*!
  160.     \brief
  161.         Constructor for Window base class
  162.  
  163.     \param type
  164.         String object holding Window type (usually provided by WindowFactory).
  165.  
  166.     \param name
  167.         String object holding unique name for the Window.
  168.     */
  169.     Window(const String& type, const String& name);
  170.  
  171.  
  172.     /*!
  173.     \brief
  174.         Destructor for Window base class
  175.     */
  176.     virtual ~Window(void);
  177.  
  178.  
  179.     /*************************************************************************
  180.         Accessor functions
  181.     *************************************************************************/
  182.     /*!
  183.     \brief
  184.         return a String object holding the type name for this Window.
  185.  
  186.     \return
  187.         String object holding the Window type.
  188.     */
  189.     const String& getType(void) const;
  190.  
  191.  
  192.     /*!
  193.     \brief
  194.         return a String object holding the name of this Window.
  195.  
  196.     \return
  197.         String object holding the unique Window name.
  198.     */
  199.     const String& getName(void) const        {return d_name;}
  200.  
  201.  
  202.     /*!
  203.     \brief
  204.         returns whether or not this Window is set to be destroyed when its parent is destroyed.
  205.  
  206.     \return
  207.         true if the Window will be destroyed when its parent is destroyed, false if it will remain.
  208.     */
  209.     bool    isDestroyedByParent(void) const        {return d_destroyedByParent;}
  210.  
  211.  
  212.     /*!
  213.     \brief
  214.         returns whether or not this Window is an always on top (a.k.a 'topmost') Window.
  215.  
  216.     \return
  217.         true if this Window is always show on top of other normal windows.  false if the Window has normal z-order behaviour.
  218.     */
  219.     bool    isAlwaysOnTop(void) const            {return d_alwaysOnTop;}
  220.  
  221.  
  222.     /*!
  223.     \brief
  224.         return true if the Window is currently disabled
  225.  
  226.     \param localOnly
  227.        States whether to only return the state set for this window, and so not factor in
  228.        inherited state from ancestor windows.
  229.  
  230.     \return
  231.         true if the window is disabled, false if the window is enabled.
  232.     */
  233.     bool    isDisabled(bool localOnly = false) const;
  234.  
  235.  
  236.     /*!
  237.     \brief
  238.         return true if the Window is currently visible.
  239.  
  240.         A true return from this function does not mean that the window is not completely obscured by other windows, just that the window
  241.         is processed when rendering and is not hidden.
  242.  
  243.     \param localOnly
  244.        States whether to only return the state set for this window, and so not factor in
  245.        inherited state from ancestor windows.
  246.  
  247.     \return
  248.         true if the window is drawn, false if the window is hidden and therefore ignored when rendering.
  249.     */
  250.     bool    isVisible(bool localOnly = false) const;
  251.  
  252.  
  253.     /*!
  254.     \brief
  255.         return true if this is the active Window (the window that receives inputs)
  256.  
  257.         Mouse events are always sent to the window containing the mouse cursor regardless of what this reports (unless the window has captured
  258.         inputs).  This mainly refers to where other (keyboard) inputs are sent.
  259.  
  260.     \return
  261.         true if this window has input focus, or false if it does not.
  262.     */
  263.     bool    isActive(void) const;
  264.  
  265.  
  266.     /*!
  267.     \brief
  268.         return true if this Window is clipped so that its rendering does not pass outside its parent windows area.
  269.  
  270.     \return
  271.         true if the window will be clipped by its parent window, or false if this windows rendering may pass outside its parents area
  272.     */
  273.     bool    isClippedByParent(void) const        {return d_clippedByParent;}
  274.  
  275.  
  276.     /*!
  277.     \brief
  278.         return the ID code currently assigned to this Window by client code.
  279.  
  280.     \return
  281.         uint value equal to the currently assigned ID code for this Window.
  282.     */
  283.     uint    getID(void) const        {return d_ID;}
  284.  
  285.  
  286.     /*!
  287.     \brief
  288.         return the number of child Window objects currently attached to this Window.
  289.  
  290.     \return
  291.         uint value equal to the number of Window objects directly attached to this Window as children.
  292.     */
  293.     uint   getChildCount(void) const      {return (uint)d_children.size();}
  294.  
  295.  
  296.     /*!
  297.     \brief
  298.         returns whether a Window with the specified name is currently attached to this Window as a child.
  299.  
  300.     \param name
  301.         String object containing the name of the Window to look for.
  302.  
  303.     \return
  304.         true if a Window named \a name is currently attached to this Window as a child, else false.
  305.     */
  306.     bool    isChild(const String& name) const;
  307.  
  308.  
  309.     /*!
  310.     \brief
  311.         returns whether at least one window with the given ID code is attached as a child.
  312.  
  313.     \note
  314.         ID codes are client assigned and may or may not be unique, and as such, the return from this function
  315.         will only have meaning to the client code.
  316.  
  317.     \param ID
  318.         uint ID code to look for.
  319.  
  320.     \return
  321.         true if a child window was found with the ID code \a ID, or false if no child window was found with the ID \a ID.
  322.     */
  323.     bool    isChild(uint ID) const;
  324.  
  325.  
  326.     /*!
  327.     \brief
  328.         return true if the given Window is a child of this window.
  329.  
  330.     \param window
  331.         Pointer to the Window object to look for.
  332.  
  333.     \return
  334.         true if Window object \a window is attached to this window as a child.
  335.     */
  336.     bool    isChild(const Window* window) const;
  337.  
  338.  
  339.     /*!
  340.     \brief
  341.         return a pointer to the child window with the specified name.
  342.  
  343.         This function will throw an exception if no child object with the given name is attached.  This decision
  344.         was made (over returning NULL if no window was found) so that client code can assume that if the call
  345.         returns it has a valid window pointer.  We provide the isChild() functions for checking if a given window
  346.         is attached.
  347.  
  348.     \param name
  349.         String object holding the name of the child window to return a pointer to.
  350.  
  351.     \return
  352.         Pointer to the Window object attached to this window that has the name \a name.
  353.  
  354.     \exception UnknownObjectException    thrown if no window named \a name is attached to this Window.
  355.     */
  356.     Window*    getChild(const String& name) const;
  357.  
  358.  
  359.     /*!
  360.     \brief
  361.         return a pointer to the first attached child window with the specified ID.
  362.  
  363.         This function will throw an exception if no child object with the given ID is attached.  This decision
  364.         was made (over returning NULL if no window was found) so that client code can assume that if the call
  365.         returns it has a valid window pointer.  We provide the isChild() functions for checking if a given window
  366.         is attached.
  367.  
  368.     \param ID
  369.         uint value specifying the ID code of the window to return a pointer to.
  370.  
  371.     \return
  372.         Pointer to the (first) Window object attached to this window that has the ID code \a ID.
  373.  
  374.     \exception UnknownObjectException    thrown if no window with the ID code \a ID is attached to this Window.
  375.     */
  376.     Window* getChild(uint ID) const;
  377.  
  378.  
  379.     /*!
  380.     \brief
  381.         return a pointer to the child window that is attached to 'this' at the given index.
  382.  
  383.     \param idx
  384.         Index of the child window whos pointer should be returned.  This value is not bounds checked,
  385.         client code should ensure that this is less than the value returned by getChildCount().
  386.  
  387.     \return
  388.         Pointer to the child window currently attached at index position \a idx
  389.     */
  390.     Window*    getChildAtIdx(uint idx) const        {return d_children[idx];}
  391.  
  392.  
  393.     /*!
  394.     \brief
  395.         return a pointer to the Window that currently has input focus starting with this Window.
  396.  
  397.     \return
  398.         Pointer to the window that is active (has input focus) starting at 'this.  Will return 'this' if this Window is active
  399.         and either no children are attached or if none of the attached children are active.  Returns NULL if this Window (and
  400.         therefore all children) are not active.
  401.     */
  402.     Window*    getActiveChild(void);
  403.     const Window* getActiveChild(void) const;
  404.  
  405.  
  406.     /*!
  407.     \brief
  408.         return true if the specified Window is some ancestor of this Window
  409.  
  410.     \param name
  411.         String object holding the name of the Window to check for.
  412.  
  413.     \return
  414.         true if a Window named \a name is an ancestor (parent, or parent of parent, etc) of this Window, or false if not.
  415.     */
  416.     bool    isAncestor(const String& name) const;
  417.  
  418.  
  419.     /*!
  420.     \brief
  421.         return true if any Window with the given ID is some ancestor of this Window.
  422.  
  423.     \param ID
  424.         uint value specifying the ID to look for.
  425.  
  426.     \return
  427.         true if an ancestor (parent, or parent of parent, etc) was found with the ID code \a ID, else false.
  428.     */
  429.     bool    isAncestor(uint ID) const;
  430.  
  431.  
  432.     /*!
  433.     \brief
  434.         return true if the specified Window is some ancestor of this Window.
  435.  
  436.     \param window
  437.         Pointer to the Window object to look for.
  438.  
  439.     \return
  440.         true if \a window was found to be an ancestor (parent, or parent of parent, etc) of this Window, otherwise false.
  441.     */
  442.     bool    isAncestor(const Window* window) const;
  443.  
  444.  
  445.     /*!
  446.     \brief
  447.         return the Font object active for the Window.
  448.  
  449.     \param useDefault
  450.        Sepcifies whether to return the default font if Window has no preference set.
  451.  
  452.     \return
  453.         Pointer to the Font being used by this Window.  If the window has no assigned font, the default font is returned.
  454.     */
  455.     const Font*        getFont(bool useDefault = true) const;
  456.  
  457.  
  458.     /*!
  459.     \brief
  460.         return the current text for the Window
  461.  
  462.     \return
  463.         A String object that holds the current text for this Window.
  464.     */
  465.     const String&    getText(void) const        {return d_text;}
  466.  
  467.  
  468.     /*!
  469.     \brief
  470.         return true if the Window inherits alpha from its parent(s).
  471.  
  472.     \return
  473.         true if the Window inherits alpha from its parent(s), false if the alpha for this Window is independant.
  474.     */
  475.     bool    inheritsAlpha(void) const        {return d_inheritsAlpha;}
  476.  
  477.  
  478.     /*!
  479.     \brief
  480.         return the current alpha value set for this Window
  481.  
  482.     \note
  483.         The alpha value set for any given window may or may not be the final alpha value that is used when rendering.  All window
  484.         objects, by default, inherit alpha from thier parent window(s) - this will blend child windows, relatively, down the line of
  485.         inheritance.  This behaviour can be overridden via the setInheritsAlpha() method.  To return the true alpha value that will be
  486.         applied when rendering, use the getEffectiveAlpha() method.
  487.  
  488.     \return
  489.         the currently set alpha value for this Window.  Will be between 0.0f and 1.0f.
  490.     */
  491.     float    getAlpha(void) const            {return d_alpha;}
  492.  
  493.  
  494.     /*!
  495.     \brief
  496.         return the effective alpha value that will be used when rendering this window, taking into account inheritance of parent
  497.         window(s) alpha.
  498.  
  499.     \return
  500.         the effective alpha that will be applied to this Window when rendering.  Will be between 0.0f and 1.0f.
  501.     */
  502.     float    getEffectiveAlpha(void) const;
  503.  
  504.  
  505.     /*!
  506.     \brief
  507.         return a Rect object that describes the Window area.
  508.  
  509.     \return
  510.         Rect object that describes the area covered by the Window.  The values in the returned Rect are in whatever form is set
  511.         as the current metric type.  The returned Rect is unclipped and relative to the Window objects parent.
  512.     */
  513.     Rect    getRect(void) const;
  514.  
  515.  
  516.     /*!
  517.     \brief
  518.         return a Rect object describing the Window area in screen space.
  519.  
  520.     \return
  521.         Rect object that describes the area covered by the Window.  The values in the returned Rect are in screen pixels.  The
  522.         returned Rect is clipped as appropriate and depending upon the 'ClippedByParent' setting.
  523.  
  524.     \note
  525.         This has now been made virtual to ease some customisations that require more specialised clipping requirements.
  526.     */
  527.     virtual Rect    getPixelRect(void) const;
  528.  
  529.  
  530.     /*!
  531.     \brief
  532.         return a Rect object describing the clipped inner area for this window.
  533.  
  534.     \return
  535.         Rect object that describes, in appropriately clipped screen pixel co-ordinates, the window object's inner rect area.
  536.     */
  537.     Rect    getInnerRect(void) const;
  538.  
  539.  
  540.     /*!
  541.     \brief
  542.         return a Rect object describing the Window area unclipped, in screen space.
  543.  
  544.     \return
  545.         Rect object that describes the area covered by the Window.  The values in the returned Rect are in screen pixels.  The
  546.         returned rect is fully unclipped.
  547.     */
  548.     Rect    getUnclippedPixelRect(void) const;
  549.  
  550.  
  551.     /*!
  552.     \brief
  553.         Return a Rect object that describes, unclipped, the inner rectangle for this window.  The inner rectangle is
  554.         typically an area that excludes some frame or other rendering that should not be touched by subsequent rendering.
  555.  
  556.     \return
  557.         Rect object that describes, in unclipped screen pixel co-ordinates, the window object's inner rect area.
  558.     */
  559.     virtual Rect    getUnclippedInnerRect(void) const;
  560.  
  561.  
  562.     /*!
  563.     \brief
  564.         return the Window that currently has inputs captured.
  565.  
  566.     \return
  567.         Pointer to the Window object that currently has inputs captured, or NULL if no Window has captured input.
  568.     */
  569.     static    Window*    getCaptureWindow(void)        {return d_captureWindow;}
  570.  
  571.  
  572.     /*!
  573.     \brief
  574.         return true if this Window has input captured.
  575.  
  576.     \return
  577.         true if this Window has captured inputs, or false if some other Window, or no Window, has captured inputs.
  578.     */
  579.     bool    isCapturedByThis(void) const        {return getCaptureWindow() == this;}
  580.  
  581.  
  582.     /*!
  583.     \brief
  584.         return true if a child window has captured inputs.
  585.  
  586.     \return
  587.         true if inputs are captured by a Window that is attached as a child of this Window, else false.
  588.     */
  589.     bool    isCapturedByAncestor(void) const    {return isAncestor(getCaptureWindow());}
  590.  
  591.  
  592.     /*!
  593.     \brief
  594.         return true if an ancestor window has captured inputs.
  595.  
  596.     \return
  597.         true if inputs are captured by a Window that is some ancestor (parent, parent of parent, etc) of this Window, else false.
  598.     */
  599.     bool    isCapturedByChild(void) const        {return isChild(getCaptureWindow());}
  600.  
  601.  
  602.     /*!
  603.     \brief
  604.         check if the given position would hit this window.
  605.  
  606.     \param position
  607.         Point object describing the position to check in screen pixels
  608.  
  609.     \return
  610.         true if \a position 'hits' this Window, else false.
  611.     */
  612.     virtual bool    isHit(const Point& position) const;
  613.  
  614.  
  615.     /*!
  616.     \brief
  617.         return the child Window that is 'hit' by the given position
  618.  
  619.     \param position
  620.         Point object that describes the position to check in screen pixels
  621.  
  622.     \return
  623.         Pointer to the child Window that was hit according to the Point \a position, or NULL if no child window was hit.
  624.     */
  625.     Window*    getChildAtPosition(const Point& position) const;
  626.  
  627.  
  628.     /*!
  629.     \brief
  630.         return the current metrics mode employed by the Window
  631.  
  632.     \return
  633.         One of the values of the MectricsMode enumerated type, that describes the current metrics in use by the Window.
  634.     */
  635.     MetricsMode    getMetricsMode(void) const;
  636.  
  637.  
  638.     /*!
  639.     \brief
  640.         return the x position of the window.  Interpretation of return value depends upon the metric type in use by this window.
  641.  
  642.     \return
  643.         float value that specifies the x position of the Window relative to it's parent, depending on the metrics system in use for this
  644.         Window, this value will specify either pixels or a decimal fraction of the width of the parent Window.
  645.     */
  646.     float    getXPosition(void) const;
  647.  
  648.  
  649.     /*!
  650.     \brief
  651.         return the y position of the window.  Interpretation of return value depends upon the metric type in use by this window.
  652.  
  653.     \return
  654.         float value that specifies the y position of the Window relative to it's parent, depending on the metrics system in use for this
  655.         Window, this value will specify either pixels or a decimal fraction of the height of the parent Window.
  656.     */
  657.     float    getYPosition(void) const;
  658.  
  659.  
  660.     /*!
  661.     \brief
  662.         return the position of the window.  Interpretation of return value depends upon the metric type in use by this window.
  663.  
  664.     \return
  665.         Point object that describes the position of the Window relative to it's parent, depending on the metrics system in use for this
  666.         Window, the values in the Point will specify either pixels or decimal fractions of the total width and height of the parent.
  667.     */
  668.     Point    getPosition(void) const;
  669.  
  670.  
  671.     /*!
  672.     \brief
  673.         return the width of the Window.  Interpretation of return value depends upon the metric type in use by this window.
  674.  
  675.     \return
  676.         float value that specifies the width of the Window.  Depending upon the metrics system in use for this window, the return
  677.         value will either be in pixels, or as a decimal fraction of the width of the parent Window.
  678.     */
  679.     float    getWidth(void) const;
  680.  
  681.     /*!
  682.     \brief
  683.         return the height of the Window.  Interpretation of return value depends upon the metric type in use by this window.
  684.  
  685.     \return
  686.         float value that specifies the height of the Window.  Depending upon the metrics system in use for this window, the return
  687.         value will either be in pixels, or as a decimal fraction of the height of the parent Window.
  688.     */
  689.     float    getHeight(void) const;
  690.  
  691.  
  692.     /*!
  693.     \brief
  694.         return the size of the Window.  Interpretation of return value depends upon the metric type in use by this window.
  695.  
  696.     \return
  697.         Size object that describes the dimensions of the Window.  Depending upon the metrics system in use for this window, the
  698.         values will either be in pixels, or as decimal fractions of the width and height of the parent Window.
  699.     */
  700.     Size    getSize(void) const;
  701.  
  702.  
  703.     /*!
  704.     \brief
  705.         return the parent of this Window.
  706.  
  707.     \return
  708.         Pointer to the Window object that is the parent of this Window.  This value can be NULL, in which case the Window is a GUI
  709.         Sheet / Root.
  710.     */
  711.     Window*    getParent(void) const                {return d_parent;}
  712.  
  713.  
  714.     /*!
  715.     \brief
  716.         Return the current maximum size for this window.
  717.  
  718.     \return
  719.         Size object describing the maximum size for this window.  If using absolute co-ordinates the returned object has it's values expressed
  720.         as screen pixels.  If using relative co-ordinates the returned object has it's values expressed as fractions of the current display size.
  721.     */
  722.     Size    getMaximumSize(void) const;
  723.  
  724.  
  725.     /*!
  726.     \brief
  727.         Return the current minimum size for this window.
  728.  
  729.     \return
  730.         Size object describing the minimum size for this window.  If using absolute co-ordinates the returned object has it's values expressed
  731.         as screen pixels.  If using relative co-ordinates the returned object has it's values expressed as fractions of the current display size.
  732.     */
  733.     Size    getMinimumSize(void) const;
  734.  
  735.  
  736.     /*!
  737.     \brief
  738.         Return a pointer to the mouse cursor image to use when the mouse is within this window.
  739.  
  740.     \param useDefault
  741.        Sepcifies whether to return the default font if Window has no preference set.
  742.  
  743.     \return
  744.         Pointer to the mouse cursor image that will be used when the mouse enters this window.  May return NULL indicating no cursor.
  745.     */
  746.     const Image*    getMouseCursor(bool useDefault = true) const;
  747.  
  748.  
  749.     /*!
  750.     \brief
  751.         Return the window area rect in relative metrics.
  752.  
  753.     \return
  754.         Rect object describing this windows area, relative to the parent window, in parent relative metrics.
  755.     */
  756.     Rect    getRelativeRect(void) const                { return d_area.asRelative(getParentSize()); }
  757.  
  758.  
  759.     /*!
  760.     \brief
  761.         Return the window position in relative metrics.
  762.  
  763.     \return
  764.         Point object describing this windows position, relative to the parent window, in parent relative metrics.
  765.     */
  766.     Point    getRelativePosition(void) const            { return d_area.getPosition().asRelative(getParentSize()); }
  767.  
  768.  
  769.     /*!
  770.     \brief
  771.         Return the window X position in relative metrics.
  772.  
  773.     \return
  774.         float value describing this windows X position, relative to the parent window, in parent relative metrics.
  775.     */
  776.     float    getRelativeXPosition(void) const        { return d_area.d_min.d_x.asRelative(getParentWidth()); }
  777.  
  778.  
  779.     /*!
  780.     \brief
  781.         Return the window Y position in relative metrics.
  782.  
  783.     \return
  784.         float value describing this windows Y position, relative to the parent window, in parent relative metrics.
  785.     */
  786.     float    getRelativeYPosition(void) const        { return d_area.d_min.d_y.asRelative(getParentHeight()); }
  787.  
  788.  
  789.     /*!
  790.     \brief
  791.         Return the window size in relative metrics.
  792.  
  793.     \return
  794.         Size object describing this windows size in parent relative metrics.
  795.     */
  796.     Size    getRelativeSize(void) const                { return d_area.getSize().asRelative(getParentSize()).asSize(); }
  797.  
  798.  
  799.     /*!
  800.     \brief
  801.         Return the window width in relative metrics.
  802.  
  803.     \return
  804.         float value describing this windows width in parent relative metrics.
  805.     */
  806.     float    getRelativeWidth(void) const            { return d_area.getWidth().asRelative(getParentWidth()); }
  807.  
  808.  
  809.     /*!
  810.     \brief
  811.         Return the window height in relative metrics.
  812.  
  813.     \return
  814.         float value describing this windows height in parent relative metrics.
  815.     */
  816.     float    getRelativeHeight(void) const            { return d_area.getHeight().asRelative(getParentHeight()); }
  817.  
  818.  
  819.     /*!
  820.     \brief
  821.         Return the window area rect in absolute metrics.
  822.  
  823.     \return
  824.         Rect object describing this windows area, relative to the parent window, in absolute metrics
  825.     */
  826.     Rect    getAbsoluteRect(void) const                { return Rect(d_area.getPosition().asAbsolute(getParentSize()), d_pixelSize); }
  827.  
  828.  
  829.     /*!
  830.     \brief
  831.         Return the window position in absolute metrics.
  832.  
  833.     \return
  834.         Point object describing this windows position, relative to the parent window, in absolute metrics.
  835.     */
  836.     Point    getAbsolutePosition(void) const            { return d_area.getPosition().asAbsolute(getParentSize()); }
  837.  
  838.  
  839.     /*!
  840.     \brief
  841.         Return the window X position in absolute metrics.
  842.  
  843.     \return
  844.         float value describing this windows X position, relative to the parent window, in absolute metrics.
  845.     */
  846.     float    getAbsoluteXPosition(void) const        { return d_area.d_min.d_x.asAbsolute(getParentWidth()); }
  847.  
  848.  
  849.     /*!
  850.     \brief
  851.         Return the window Y position in absolute metrics.
  852.  
  853.     \return
  854.         float value describing this windows Y position, relative to the parent window, in absolute metrics.
  855.     */
  856.     float    getAbsoluteYPosition(void) const        { return d_area.d_min.d_y.asAbsolute(getParentHeight()); }
  857.  
  858.  
  859.     /*!
  860.     \brief
  861.         Return the window size in absolute metrics.
  862.  
  863.     \return
  864.         Size object describing this windows size in absolute metrics.
  865.     */
  866.     Size    getAbsoluteSize(void) const                { return d_pixelSize; }
  867.  
  868.  
  869.     /*!
  870.     \brief
  871.         Return the window width in absolute metrics.
  872.  
  873.     \return
  874.         float value describing this windows width in absolute metrics.
  875.     */
  876.     float    getAbsoluteWidth(void) const            { return d_pixelSize.d_width; }
  877.  
  878.  
  879.     /*!
  880.     \brief
  881.         Return the window height in absolute metrics.
  882.  
  883.     \return
  884.     float value describing this windows height in absolute metrics.
  885.     */
  886.     float    getAbsoluteHeight(void) const            { return d_pixelSize.d_height; }
  887.  
  888.  
  889.     /*!
  890.     \brief
  891.         Return the user data set for this Window.
  892.  
  893.         Each Window can have some client assigned data attached to it, this data is not used by the GUI system
  894.         in any way.  Interpretation of the data is entirely application specific.
  895.  
  896.     \return
  897.         pointer to the user data that is currently set for this window.
  898.     */
  899.     void*    getUserData(void) const            {return d_userData;}
  900.  
  901.  
  902.     /*!
  903.     \brief
  904.         return the x position of the window using the specified metrics system.
  905.  
  906.     \param mode
  907.         One of the MetricsMode enumerated values specifying the metrics system to be used for the return value.
  908.  
  909.     \return
  910.         float value that specifies the x position of the Window relative to it's parent, using the specified MetricsMode.
  911.     */
  912.     float    getXPosition(MetricsMode mode) const;
  913.  
  914.  
  915.     /*!
  916.     \brief
  917.         return the y position of the window using the specified metrics system.
  918.  
  919.     \param mode
  920.         One of the MetricsMode enumerated values specifying the metrics system to be used for the return value.
  921.  
  922.     \return
  923.         float value that specifies the y position of the Window relative to it's parent,  using the specified MetricsMode.
  924.     */
  925.     float    getYPosition(MetricsMode mode) const;
  926.  
  927.  
  928.     /*!
  929.     \brief
  930.         return the position of the window using the specified metrics system.
  931.  
  932.     \param mode
  933.         One of the MetricsMode enumerated values specifying the metrics system to be used for the return value.
  934.  
  935.     \return
  936.         Point object that describes the position of the Window relative to it's parent, using the specified MetricsMode.
  937.     */
  938.     Point    getPosition(MetricsMode mode) const;
  939.  
  940.  
  941.     /*!
  942.     \brief
  943.         return the width of the Window using the specified metrics system.
  944.  
  945.     \param mode
  946.         One of the MetricsMode enumerated values specifying the metrics system to be used for the return value.
  947.  
  948.     \return
  949.         float value that specifies the width of the Window using the specified MetricsMode.
  950.     */
  951.     float    getWidth(MetricsMode mode) const;
  952.  
  953.  
  954.     /*!
  955.     \brief
  956.         return the height of the Window using the specified metrics system.
  957.  
  958.     \param mode
  959.         One of the MetricsMode enumerated values specifying the metrics system to be used for the return value.
  960.  
  961.     \return
  962.         float value that specifies the height of the Window using the specified MetricsMode.
  963.     */
  964.     float    getHeight(MetricsMode mode) const;
  965.  
  966.  
  967.     /*!
  968.     \brief
  969.         return the size of the Window using the specified metrics system.
  970.  
  971.     \param mode
  972.         One of the MetricsMode enumerated values specifying the metrics system to be used for the return value.
  973.  
  974.     \return
  975.         Size object that describes the dimensions of the Window using the specified MetricsMode.
  976.     */
  977.     Size    getSize(MetricsMode mode) const;
  978.  
  979.  
  980.     /*!
  981.     \brief
  982.         return a Rect object that describes the Window area using the specified metrics system.
  983.  
  984.     \param mode
  985.         One of the MetricsMode enumerated values specifying the metrics system to be used for the return value.
  986.  
  987.     \return
  988.         Rect object that describes the area covered by the Window using the specified MetricsMode.
  989.     */
  990.     Rect    getRect(MetricsMode mode) const;
  991.  
  992.  
  993.     /*!
  994.     \brief
  995.         Return whether this window is set to restore old input capture when it loses input capture.
  996.  
  997.         This is only really useful for certain sub-components for widget writers.
  998.  
  999.     \return
  1000.         - true if the window will restore the previous capture window when it loses input capture.
  1001.         - false if the window will set the capture window to NULL when it loses input capture (this is the default behaviour).
  1002.     */
  1003.     bool    restoresOldCapture(void) const        {return d_restoreOldCapture;}
  1004.  
  1005.  
  1006.     /*!
  1007.     \brief
  1008.         Return whether z-order changes are enabled or disabled for this Window.
  1009.  
  1010.     \return
  1011.         - true if z-order changes are enabled for this window.  moveToFront/moveToBack work normally as expected.
  1012.         - false: z-order changes are disabled for this window.  moveToFront/moveToBack are ignored for this window.
  1013.     */
  1014.     bool    isZOrderingEnabled(void) const;
  1015.  
  1016.  
  1017.     /*!
  1018.     \brief
  1019.         Return whether this window will receive multi-click events or multiple 'down' events instead.
  1020.  
  1021.     \return
  1022.         - true if the Window will receive double-click and triple-click events.
  1023.         - false if the Window will receive multiple mouse button down events instead of double/triple click events.
  1024.     */
  1025.     bool    wantsMultiClickEvents(void) const;
  1026.  
  1027.  
  1028.     /*!
  1029.     \brief
  1030.         Return whether mouse button down event autorepeat is enabled for this window.
  1031.  
  1032.     \return
  1033.         - true if autorepeat of mouse button down events is enabled for this window.
  1034.         - false if autorepeat of mouse button down events is not enabled for this window.
  1035.     */
  1036.     bool    isMouseAutoRepeatEnabled(void) const;
  1037.  
  1038.  
  1039.     /*!
  1040.     \brief
  1041.         Return the current auto-repeat delay setting for this window.
  1042.  
  1043.     \return
  1044.         float value indicating the delay, in seconds, defore the first repeat mouse button down event will be triggered when autorepeat is enabled.
  1045.     */
  1046.     float   getAutoRepeatDelay(void) const;
  1047.  
  1048.     
  1049.     /*!
  1050.     \brief
  1051.         Return the current auto-repeat rate setting for this window.
  1052.  
  1053.     \return
  1054.         float value indicating the rate, in seconds, at which repeat mouse button down events will be generated after the initial delay has expired.
  1055.     */
  1056.     float   getAutoRepeatRate(void) const;
  1057.  
  1058.  
  1059.     /*!
  1060.     \brief
  1061.         Return whether the window wants inputs passed to its attached
  1062.         child windows when the window has inputs captured.
  1063.  
  1064.     \return
  1065.         - true if System should pass captured input events to child windows.
  1066.         - false if System should pass captured input events to this window only.
  1067.     */
  1068.     bool    distributesCapturedInputs(void) const;
  1069.  
  1070.  
  1071.     /*!
  1072.     \brief
  1073.         Return whether this Window is using the system default Tooltip for its Tooltip window.
  1074.  
  1075.     \return
  1076.         - true if the Window will use the system default tooltip.
  1077.         - false if the window has a custom Tooltip object.
  1078.     */
  1079.     bool isUsingDefaultTooltip(void) const;
  1080.  
  1081.     /*!
  1082.     \brief
  1083.         Return a pointer to the Tooltip object used by this Window.  The value returned may
  1084.         point to the system default Tooltip, a custom Window specific Tooltip, or be NULL.
  1085.  
  1086.     \return
  1087.         Pointer to a Tooltip based object, or NULL.
  1088.     */
  1089.     Tooltip* getTooltip(void) const;
  1090.  
  1091.     /*!
  1092.     \brief
  1093.         Return the custom tooltip type.
  1094.  
  1095.     \return
  1096.         String object holding the current custom tooltip window type, or an empty string if no custom tooltip is set.
  1097.      */
  1098.     String getTooltipType(void) const;
  1099.  
  1100.     /*!
  1101.     \brief
  1102.         Return the current tooltip text set for this Window.
  1103.  
  1104.     \return
  1105.         String object holding the current tooltip text set for this window.
  1106.      */
  1107.     const String& getTooltipText(void) const;
  1108.  
  1109.     /*!
  1110.     \brief
  1111.         Return whether this window inherits Tooltip text from its parent when its own tooltip text is not set.
  1112.  
  1113.     \return
  1114.         - true if the window inherits tooltip text from its parent when its own text is not set.
  1115.         - false if the window does not inherit tooltip text from its parent (and shows no tooltip when no text is set).
  1116.      */
  1117.     bool inheritsTooltipText(void) const;
  1118.  
  1119.     /*!
  1120.     \brief
  1121.         Return whether this window will rise to the top of the z-order when clicked with the left mouse button.
  1122.  
  1123.     \return
  1124.         - true if the window will come to the top of other windows when the left mouse button is pushed within its area.
  1125.         - false if the window does not change z-order position when the left mouse button is pushed within its area.
  1126.      */
  1127.     bool isRiseOnClickEnabled(void) const   { return d_riseOnClick; }
  1128.  
  1129.     /*!
  1130.     \brief
  1131.         Return whether this window was inherited from the given class name at some point in the inheritance heirarchy.
  1132.  
  1133.     \param class_name
  1134.         The class name that is to be checked.
  1135.  
  1136.     \return
  1137.         true if this window was inherited from \a class_name. false if not.
  1138.     */
  1139.     bool testClassName(const String& class_name) const        {return testClassName_impl(class_name);}
  1140.  
  1141.     /*!
  1142.     \brief
  1143.         Get the vertical alignment.
  1144.  
  1145.         Returns the vertical alignment for the window.  This setting affects how the windows position is
  1146.         interpreted relative to its parent.
  1147.  
  1148.     \return
  1149.         One of the VerticalAlignment enumerated values.
  1150.      */
  1151.     VerticalAlignment getVerticalAlignment() const  {return d_vertAlign;}
  1152.  
  1153.     /*!
  1154.     \brief
  1155.         Get the horizontal alignment.
  1156.  
  1157.         Returns the horizontal alignment for the window.  This setting affects how the windows position is
  1158.         interpreted relative to its parent.
  1159.  
  1160.     \return
  1161.         One of the HorizontalAlignment enumerated values.
  1162.      */
  1163.     HorizontalAlignment getHorizontalAlignment() const  {return d_horzAlign;}
  1164.  
  1165.     /*!
  1166.     \brief
  1167.         Return the RenderCache object for this Window.
  1168.  
  1169.     \return
  1170.         Reference to the RenderCache object for this Window.
  1171.     */
  1172.     RenderCache& getRenderCache()   { return d_renderCache; }
  1173.  
  1174.     /*!
  1175.     \brief
  1176.         Get the name of the LookNFeel assigned to this window.
  1177.  
  1178.     \return
  1179.         String object holding the name of the look assigned to this window.
  1180.         Returns the empty string if no look is assigned.
  1181.     */
  1182.     const String& getLookNFeel();
  1183.  
  1184.     /*!
  1185.     \brief
  1186.         Get whether or not this Window is the modal target.
  1187.  
  1188.     \return
  1189.         Returns true if this Window is the modal target, otherwise false.
  1190.     */
  1191.     bool getModalState(void) const    {return (System::getSingleton().getModalTarget() == this);}
  1192.  
  1193.  
  1194.     /*!
  1195.     \brief
  1196.        Returns a named user string.
  1197.  
  1198.     \param name
  1199.         String object holding the name of the string to be returned.
  1200.  
  1201.     \return
  1202.         String object holding the data stored for the requested user string.
  1203.  
  1204.     \exception UnknownObjectException thrown if a user string named \a name does not exist.
  1205.     */
  1206.     const String& getUserString(const String& name) const;
  1207.  
  1208.     /*!
  1209.     \brief
  1210.         Return whether a user string with the specified name exists.
  1211.  
  1212.     \param name
  1213.         String object holding the name of the string to be checked.
  1214.  
  1215.     \return
  1216.         - true if a user string named \a name exists.
  1217.         - false if no such user string exists.
  1218.     */
  1219.     bool isUserStringDefined(const String& name) const;
  1220.  
  1221.     /*!
  1222.     \brief
  1223.         Returns the active sibling window.
  1224.  
  1225.         This searches the immediate children of this window's parent, and returns a pointer
  1226.         to the active window.  The method will return this if we are the immediate child of our
  1227.         parent that is active.  If our parent is not active, or if no immediate child of our
  1228.         parent is active then 0 is returned.  If this window has no parent, and this window is
  1229.         not active then 0 is returned, else this is returned.
  1230.  
  1231.     \return
  1232.         A pointer to the immediate child window attached to our parent that is currently active,
  1233.         or 0 if no immediate child of our parent is active.
  1234.     */
  1235.     Window* getActiveSibling();
  1236.  
  1237.     /*************************************************************************
  1238.         Manipulator functions
  1239.     *************************************************************************/
  1240.     /*!
  1241.     \brief
  1242.         Renames the window.
  1243.  
  1244.     \param new_name
  1245.         String object holding the new name for the window.
  1246.  
  1247.     \exception AlreadyExistsException
  1248.         thrown if a Window named \a new_name already exists in the system.
  1249.     */
  1250.     void rename(const String& new_name);
  1251.  
  1252.     /*!
  1253.     \brief
  1254.         Initialises the Window based object ready for use.
  1255.  
  1256.     \note
  1257.         This must be called for every window created.  Normally this is handled automatically by the WindowFactory for each Window type.
  1258.  
  1259.     \return
  1260.         Nothing
  1261.     */
  1262.     virtual void    initialise(void) {}
  1263.  
  1264.  
  1265.     /*!
  1266.     \brief
  1267.         Set whether or not this Window will automatically be destroyed when its parent Window is destroyed.
  1268.  
  1269.     \param setting
  1270.         set to true to have the Window auto-destroyed when its parent is destroyed (default), or false to have the Window
  1271.         remain after its parent is destroyed.
  1272.  
  1273.     \return
  1274.         Nothing
  1275.     */
  1276.     void    setDestroyedByParent(bool setting);
  1277.  
  1278.  
  1279.     /*!
  1280.     \brief
  1281.         Set whether this window is always on top, or not.
  1282.  
  1283.     \param setting
  1284.         true to have the Window appear on top of all other non always on top windows, or false to allow the window to be covered by other windows.
  1285.  
  1286.     \return
  1287.         Nothing
  1288.     */
  1289.     void    setAlwaysOnTop(bool setting);
  1290.  
  1291.  
  1292.     /*!
  1293.     \brief
  1294.         Set whether this window is enabled or disabled.  A disabled window normally can not be interacted with, and may have different rendering.
  1295.  
  1296.     \param setting
  1297.         true to enable the Window, and false to disable the Window.
  1298.  
  1299.     \return
  1300.         Nothing
  1301.     */
  1302.     void    setEnabled(bool setting);
  1303.  
  1304.  
  1305.     /*!
  1306.     \brief
  1307.         enable the Window to allow interaction.
  1308.  
  1309.     \return
  1310.         Nothing
  1311.     */
  1312.     void    enable(void)        {setEnabled(true);}
  1313.  
  1314.  
  1315.     /*!
  1316.     \brief
  1317.         disable the Window to prevent interaction.
  1318.  
  1319.     \return
  1320.         Nothing
  1321.     */
  1322.     void    disable(void)        {setEnabled(false);}
  1323.  
  1324.  
  1325.     /*!
  1326.     \brief
  1327.         Set whether the Window is visible or hidden.
  1328.  
  1329.     \param setting
  1330.         true to make the Window visible, or false to make the Window hidden
  1331.  
  1332.     \return
  1333.         Nothing
  1334.     */
  1335.     void    setVisible(bool setting);
  1336.  
  1337.  
  1338.     /*!
  1339.     \brief
  1340.         show the Window
  1341.  
  1342.     \return
  1343.         Nothing
  1344.     */
  1345.     void    show(void)            {setVisible(true);}
  1346.  
  1347.  
  1348.     /*!
  1349.     \brief
  1350.         hide the Window.
  1351.  
  1352.     \return    
  1353.         Nothing
  1354.     */
  1355.     void    hide(void)            {setVisible(false);}
  1356.  
  1357.  
  1358.     /*!
  1359.     \brief
  1360.         Activate the Window giving it input focus and bringing it to the top of all non always-on-top Windows.
  1361.  
  1362.     \return
  1363.         Nothing
  1364.     */
  1365.     void    activate(void);
  1366.  
  1367.  
  1368.     /*!
  1369.     \brief
  1370.         Deactivate the window.  No further inputs will be received by the window until it is re-activated either programmatically or
  1371.         by the user interacting with the gui.
  1372.     
  1373.     \return
  1374.         Nothing.
  1375.     */
  1376.     void    deactivate(void);
  1377.  
  1378.  
  1379.     /*!
  1380.     \brief
  1381.         Set whether this Window will be clipped by its parent window(s).
  1382.  
  1383.     \param setting
  1384.         true to have the Window clipped so that rendering is constrained to within the area of its parent(s), or false to have rendering constrained
  1385.         to the screen only.
  1386.  
  1387.     \return
  1388.         Nothing
  1389.     */
  1390.     void    setClippedByParent(bool setting);
  1391.     
  1392.  
  1393.     /*!
  1394.     \brief
  1395.         Set the current ID for the Window.
  1396.  
  1397.     \param ID
  1398.         Client assigned ID code for this Window.  The GUI system assigns no meaning to any IDs, they are a device purely for client code usage.
  1399.  
  1400.     \return
  1401.         Nothing
  1402.     */
  1403.     void    setID(uint ID);
  1404.  
  1405.  
  1406.     /*!
  1407.     \brief
  1408.         Set the current text string for the Window.
  1409.  
  1410.     \param text
  1411.         String object containing the text that is to be set as the Window text.
  1412.  
  1413.     \return
  1414.         Nothing
  1415.     */
  1416.     void    setText(const String& text);
  1417.  
  1418.  
  1419.     /*!
  1420.     \brief
  1421.         Set the current width of the Window.  Interpretation of the input value \a width is dependant upon the current metrics system set for the Window.
  1422.  
  1423.     \param width
  1424.         float value that specifies the new width for the window, in units consistent with whatever metrics mode is in operation.
  1425.  
  1426.     \return
  1427.         Nothing
  1428.     */
  1429.     void    setWidth(float width);
  1430.  
  1431.  
  1432.     /*!
  1433.     \brief
  1434.         Set the current height of the Window.  Interpretation of the input value \a height is dependant upon the current metrics system set for the Window.
  1435.  
  1436.     \param height
  1437.         float value that specifies the new height for the window, in units consistent with whatever metrics mode is in operation.
  1438.  
  1439.     \return
  1440.         Nothing
  1441.     */
  1442.     void    setHeight(float height);
  1443.  
  1444.  
  1445.     /*!
  1446.     \brief
  1447.         Set the current size of the Window.  Interpretation of the input value \a size is dependant upon the current metrics system set for the Window.
  1448.  
  1449.     \param size
  1450.         Size object that describes the new dimensions for the window, in units consistent with whatever metrics mode is in operation.
  1451.  
  1452.     \return
  1453.         Nothing
  1454.     */
  1455.     void    setSize(const Size& size);
  1456.  
  1457.  
  1458.     /*!
  1459.     \brief
  1460.         Set the current 'x' position of the Window.  Interpretation of the input value \a x is dependant upon the current metrics system set for the Window.
  1461.  
  1462.     \param x
  1463.         float value that specifies the new x postion of the Window, in units consistent with the current metrics mode.
  1464.  
  1465.     \return
  1466.         Nothing
  1467.     */
  1468.     void    setXPosition(float x);
  1469.  
  1470.  
  1471.     /*!
  1472.     \brief
  1473.         Set the current 'y' position of the Window.  Interpretation of the input value \a y is dependant upon the current metrics system set for the Window.
  1474.  
  1475.     \param y
  1476.         float value that specifies the new y postion of the Window, in units consistent with the current metrics mode.
  1477.  
  1478.     \return
  1479.         Nothing
  1480.     */
  1481.     void    setYPosition(float y);
  1482.  
  1483.  
  1484.     /*!
  1485.     \brief
  1486.         Set the current position of the Window.  Interpretation of the input value \a position is dependant upon the current metrics system set for the Window.
  1487.  
  1488.     \param position
  1489.         Point object that describes the new postion of the Window, in units consistent with the current metrics mode.
  1490.  
  1491.     \return
  1492.         Nothing
  1493.     */
  1494.     void    setPosition(const Point& position);
  1495.  
  1496.  
  1497.     /*!
  1498.     \brief
  1499.         Set the current area for the Window, this allows for setting of position and size at the same time.  
  1500.         Interpretation of the input value \a area is dependant upon the current metrics system set for the Window.
  1501.  
  1502.     \param area
  1503.         Rect object that describes the new area for Window, in units consistent with the current metrics mode.
  1504.  
  1505.     \return
  1506.         Nothing
  1507.     */
  1508.     void    setAreaRect(const Rect& area);
  1509.  
  1510.     
  1511.     /*!
  1512.     \brief
  1513.         Set the font used by this Window.
  1514.  
  1515.     \param font
  1516.         Pointer to the Font object to be used by this Window.  If \a font is NULL, the default font will be used.
  1517.  
  1518.     \return
  1519.         Nothing
  1520.     */
  1521.     void    setFont(const Font* font);
  1522.  
  1523.  
  1524.     /*!
  1525.     \brief
  1526.         Set the font used by this Window.
  1527.  
  1528.     \param name
  1529.         String object holding the name of the Font object to be used by this Window.  If \a name == "", the default font will be used.
  1530.  
  1531.     \return
  1532.         Nothing
  1533.  
  1534.     \exception UnknownObjectException    thrown if the specified Font is unknown within the system.
  1535.     */
  1536.     void    setFont(const String& name);
  1537.  
  1538.  
  1539.     /*!
  1540.     \brief
  1541.         Add the named Window as a child of this Window.  If the Window \a name is already attached to a Window, it is detached before
  1542.         being added to this Window.
  1543.  
  1544.     \param name
  1545.         String object holding the name of the Window to be added.
  1546.  
  1547.     \return
  1548.         Nothing.
  1549.  
  1550.     \exception UnknownObjectException    thrown if no Window named \a name exists.
  1551.     \exception InvalidRequestException    thrown if Window \a name is an ancestor of this Window, to prevent cyclic Window structures.
  1552.     */
  1553.     void    addChildWindow(const String& name);
  1554.  
  1555.  
  1556.     /*!
  1557.     \brief
  1558.         Add the specified Window as a child of this Window.  If the Window \a window is already attached to a Window, it is detached before
  1559.         being added to this Window.
  1560.  
  1561.     \param window
  1562.         Pointer to the Window object to be added.
  1563.  
  1564.     \return
  1565.         Nothing
  1566.  
  1567.     \exception InvalidRequestException    thrown if Window \a window is an ancestor of this Window, to prevent cyclic Window structures.
  1568.     */
  1569.     void    addChildWindow(Window* window);
  1570.  
  1571.  
  1572.     /*!
  1573.     \brief
  1574.         Remove the named Window from this windows child list.
  1575.  
  1576.     \param name
  1577.         String object holding the name of the Window to be removed.  If the Window specified is not attached to this Window, nothing happens.
  1578.  
  1579.     \return
  1580.         Nothing.
  1581.     */
  1582.     void    removeChildWindow(const String& name);
  1583.  
  1584.  
  1585.     /*!
  1586.     \brief
  1587.         Remove the specified Window form this windows child list.
  1588.  
  1589.     \param window
  1590.         Pointer to the Window object to be removed.  If the \a window is not attached to this Window, then nothing happens.
  1591.  
  1592.     \return
  1593.         Nothing.
  1594.     */
  1595.     void    removeChildWindow(Window* window);
  1596.  
  1597.  
  1598.     /*!
  1599.     \brief
  1600.         Remove the first child Window with the specified ID.  If there is more than one attached Window objects with the specified ID, only the fist
  1601.         one encountered will be removed.
  1602.  
  1603.     \param ID
  1604.         ID number assigned to the Window to be removed.  If no Window with ID code \a ID is attached, nothing happens.
  1605.  
  1606.     \return
  1607.         Nothing.
  1608.     */
  1609.     void    removeChildWindow(uint ID);
  1610.  
  1611.  
  1612.     /*!
  1613.     \brief
  1614.         Move the Window to the top of the z order.
  1615.  
  1616.         - If the Window is a non always-on-top window it is moved the the top of all other non always-on-top sibling windows, and the process
  1617.             repeated for all ancestors.
  1618.         - If the Window is an always-on-top window it is moved to the of of all sibling Windows, and the process repeated for all ancestors.
  1619.  
  1620.     \return
  1621.         Nothing
  1622.     */
  1623.     void    moveToFront();
  1624.  
  1625.  
  1626.     /*!
  1627.     \brief
  1628.         Move the Window to the bottom of the Z order.
  1629.  
  1630.         - If the window is non always-on-top the Window is sent to the very bottom of its sibling windows and the process repeated for all ancestors.
  1631.         - If the window is always-on-top, the Window is sent to the bottom of all sibling always-on-top windows and the process repeated for all ancestors.
  1632.  
  1633.     \return
  1634.         Nothing
  1635.     */
  1636.     void    moveToBack();
  1637.  
  1638.  
  1639.     /*!
  1640.     \brief
  1641.         Captures input to this window
  1642.  
  1643.     \return
  1644.         - true if input was successfully captured to this window.
  1645.         - false if input could not be captured to this window (maybe because the window is not active).
  1646.     */
  1647.     bool    captureInput(void);
  1648.  
  1649.  
  1650.     /*!
  1651.     \brief
  1652.         Releases input capture from this Window.  If this Window does not have inputs captured, nothing happens.
  1653.  
  1654.     \return
  1655.         Nothing
  1656.     */
  1657.     void    releaseInput(void);
  1658.  
  1659.  
  1660.     /*!
  1661.     \brief
  1662.         Set whether this window will remember and restore the previous window that had inputs captured.
  1663.  
  1664.     \param setting
  1665.         - true: The window will remember and restore the previous capture window.  The CaptureLost event is not fired
  1666.           on the previous window when this window steals input capture.  When this window releases capture, the old capture
  1667.           window is silently restored.
  1668.  
  1669.         - false: Input capture works as normal, each window losing capture is signalled via CaptureLost, and upon the final
  1670.           release of capture, no previous setting is restored (this is the default 'normal' behaviour).
  1671.  
  1672.     \return
  1673.         Nothing
  1674.     */
  1675.     void    setRestoreCapture(bool setting);
  1676.  
  1677.  
  1678.     /*!
  1679.     \brief
  1680.         Set the current alpha value for this window.
  1681.  
  1682.     \note
  1683.         The alpha value set for any given window may or may not be the final alpha value that is used when rendering.  All window
  1684.         objects, by default, inherit alpha from thier parent window(s) - this will blend child windows, relatively, down the line of
  1685.         inheritance.  This behaviour can be overridden via the setInheritsAlpha() method.  To return the true alpha value that will be
  1686.         applied when rendering, use the getEffectiveAlpha() method.
  1687.  
  1688.     \param alpha
  1689.         The new alpha value for the window.  Value should be between 0.0f and 1.0f.
  1690.  
  1691.     \return
  1692.         Nothing
  1693.     */
  1694.     void    setAlpha(float alpha);
  1695.  
  1696.  
  1697.     /*!
  1698.     \brief
  1699.         Sets whether this Window will inherit alpha from its parent windows.
  1700.  
  1701.     \param setting
  1702.         true if the Window should use inherited alpha, or false if the Window should have an independant alpha value.
  1703.  
  1704.     \return
  1705.         Nothing
  1706.     */
  1707.     void    setInheritsAlpha(bool setting);
  1708.  
  1709.  
  1710.     /*!
  1711.     \brief
  1712.         Signal the System object to redraw (at least) this Window on the next render cycle.
  1713.  
  1714.     \return
  1715.         Nothing
  1716.     */
  1717.     void    requestRedraw(void) const;
  1718.  
  1719.  
  1720.     /*!
  1721.     \brief
  1722.         set the current metrics mode employed by the Window
  1723.  
  1724.     \param mode
  1725.         One of the values of the MectricsMode enumerated type, that describes the metrics mode to be used by the Window.
  1726.  
  1727.     \return
  1728.         Nothing
  1729.     */
  1730.     void setMetricsMode(MetricsMode    mode);
  1731.  
  1732.  
  1733.     /*!
  1734.     \brief
  1735.         Set the minimum size for this window.
  1736.  
  1737.     \param sz
  1738.         Size object describing the minimum size for the window.  For absolute metrics, the Size values are in screen pixels,
  1739.         for relative metrics the Size values are relative to the display size.
  1740.     */
  1741.     void    setMinimumSize(const Size& sz);
  1742.  
  1743.  
  1744.     /*!
  1745.     \brief
  1746.         Set the maximum size for this window.
  1747.  
  1748.     \param sz
  1749.         Size object describing the maximum size for the window.  For absolute metrics, the Size values are in screen pixels,
  1750.         for relative metrics the Size values are relative to the display size.
  1751.     */
  1752.     void    setMaximumSize(const Size& sz);
  1753.  
  1754.  
  1755.     /*!
  1756.     \brief
  1757.         Set the mouse cursor image to be used when the mouse enters this window.
  1758.  
  1759.     \param image
  1760.         Pointer to the Image object to use as the mouse cursor image when the mouse enters the area for this Window.
  1761.  
  1762.     \return
  1763.         Nothing.
  1764.     */
  1765.     void    setMouseCursor(const Image* image)        {d_mouseCursor = image;}
  1766.  
  1767.  
  1768.     /*!
  1769.     \brief
  1770.         Set the mouse cursor image to be used when the mouse enters this window.
  1771.  
  1772.     \param image
  1773.         One of the MouseCursorImage enumerated values.
  1774.  
  1775.     \return
  1776.         Nothing.
  1777.     */
  1778.     void    setMouseCursor(MouseCursorImage image)        {d_mouseCursor = (const Image*)image;}
  1779.  
  1780.  
  1781.     /*!
  1782.     \brief
  1783.         Set the mouse cursor image to be used when the mouse enters this window.
  1784.  
  1785.     \param imageset
  1786.         String object that contains the name of the Imageset that contains the image to be used.
  1787.  
  1788.     \param image_name
  1789.         String object that contains the name of the Image on \a imageset that is to be used.
  1790.  
  1791.     \return
  1792.         Nothing.
  1793.  
  1794.     \exception UnknownObjectException    thrown if \a imageset is not known, or if \a imageset contains no Image named \a image_name.
  1795.     */
  1796.     void    setMouseCursor(const String& imageset, const String& image_name);
  1797.  
  1798.  
  1799.     /*!
  1800.     \brief
  1801.         Set the user data set for this Window.
  1802.  
  1803.         Each Window can have some client assigned data attached to it, this data is not used by the GUI system
  1804.         in any way.  Interpretation of the data is entirely application specific.
  1805.  
  1806.     \param user_data
  1807.         pointer to the user data that is to be set for this window.
  1808.  
  1809.     \return
  1810.         Nothing.
  1811.     */
  1812.     void    setUserData(void* user_data)        {d_userData = user_data;}
  1813.  
  1814.  
  1815.     /*!
  1816.     \brief
  1817.         set the x position of the window using the specified metrics system.
  1818.  
  1819.     \param mode
  1820.         One of the MetricsMode enumerated values specifying the metrics system to be used for the return value.
  1821.  
  1822.     \param x
  1823.         float value that specifies the x position of the Window relative to it's parent, using the specified MetricsMode.
  1824.  
  1825.     \return
  1826.         Nothing.
  1827.     */
  1828.     void    setXPosition(MetricsMode mode, float x);
  1829.  
  1830.  
  1831.     /*!
  1832.     \brief
  1833.         set the y position of the window using the specified metrics system.
  1834.  
  1835.     \param mode
  1836.         One of the MetricsMode enumerated values specifying the metrics system to be used for the return value.
  1837.  
  1838.     \param y
  1839.         float value that specifies the y position of the Window relative to it's parent,  using the specified MetricsMode.
  1840.  
  1841.     \return
  1842.         Nothing.
  1843.     */
  1844.     void    setYPosition(MetricsMode mode, float y);
  1845.  
  1846.  
  1847.     /*!
  1848.     \brief
  1849.         set the position of the window using the specified metrics system.
  1850.  
  1851.     \param mode
  1852.         One of the MetricsMode enumerated values specifying the metrics system to be used for the return value.
  1853.  
  1854.     \param position
  1855.         Point object that describes the position of the Window relative to it's parent, using the specified MetricsMode.
  1856.  
  1857.     \return
  1858.         Nothing
  1859.     */
  1860.     void    setPosition(MetricsMode mode, const Point& position);
  1861.  
  1862.  
  1863.     /*!
  1864.     \brief
  1865.         set the width of the Window using the specified metrics system.
  1866.  
  1867.     \param mode
  1868.         One of the MetricsMode enumerated values specifying the metrics system to be used for the return value.
  1869.  
  1870.     \param width
  1871.         float value that specifies the width of the Window using the specified MetricsMode.
  1872.  
  1873.     \return
  1874.         Nothing.
  1875.     */
  1876.     void    setWidth(MetricsMode mode, float width);
  1877.  
  1878.  
  1879.     /*!
  1880.     \brief
  1881.         set the height of the Window using the specified metrics system.
  1882.  
  1883.     \param mode
  1884.         One of the MetricsMode enumerated values specifying the metrics system to be used for the return value.
  1885.  
  1886.     \param height
  1887.         float value that specifies the height of the Window using the specified MetricsMode.
  1888.  
  1889.     \return
  1890.         Nothing.
  1891.     */
  1892.     void    setHeight(MetricsMode mode, float height);
  1893.  
  1894.  
  1895.     /*!
  1896.     \brief
  1897.         set the size of the Window using the specified metrics system.
  1898.  
  1899.     \param mode
  1900.         One of the MetricsMode enumerated values specifying the metrics system to be used for the return value.
  1901.  
  1902.     \param size
  1903.         Size object that describes the dimensions of the Window using the specified MetricsMode.
  1904.  
  1905.     \return
  1906.         Nothing.
  1907.     */
  1908.     void    setSize(MetricsMode mode, const Size& size);
  1909.  
  1910.  
  1911.     /*!
  1912.     \brief
  1913.         set the Rect that describes the Window area using the specified metrics system.
  1914.  
  1915.     \param mode
  1916.         One of the MetricsMode enumerated values specifying the metrics system to be used for the return value.
  1917.  
  1918.     \param area
  1919.         Rect object that describes the area to be covered by the Window using the specified MetricsMode.
  1920.  
  1921.     \return
  1922.         Nothing.
  1923.     */
  1924.     void    setRect(MetricsMode mode, const Rect& area);
  1925.  
  1926.  
  1927.     /*!
  1928.     \brief
  1929.         Set whether z-order changes are enabled or disabled for this Window.
  1930.  
  1931.     \param setting
  1932.         - true if z-order changes are enabled for this window.  moveToFront/moveToBack work normally as expected.
  1933.         - false: z-order changes are disabled for this window.  moveToFront/moveToBack are ignored for this window.
  1934.  
  1935.     \return
  1936.         Nothing.
  1937.     */
  1938.     void    setZOrderingEnabled(bool setting);
  1939.  
  1940.  
  1941.     /*!
  1942.     \brief
  1943.         Set whether this window will receive multi-click events or multiple 'down' events instead.
  1944.  
  1945.     \param setting
  1946.         - true if the Window will receive double-click and triple-click events.
  1947.         - false if the Window will receive multiple mouse button down events instead of double/triple click events.
  1948.  
  1949.     \return
  1950.         Nothing.
  1951.     */
  1952.     void setWantsMultiClickEvents(bool setting);
  1953.  
  1954.     
  1955.     /*!
  1956.     \brief
  1957.         Set whether mouse button down event autorepeat is enabled for this window.
  1958.  
  1959.     \param setting
  1960.         - true to enable autorepeat of mouse button down events.
  1961.         - false to disable autorepeat of mouse button down events.
  1962.  
  1963.     \return
  1964.         Nothing.
  1965.     */
  1966.     void    setMouseAutoRepeatEnabled(bool setting);
  1967.  
  1968.  
  1969.     /*!
  1970.     \brief
  1971.         Set the current auto-repeat delay setting for this window.
  1972.  
  1973.     \param delay
  1974.         float value indicating the delay, in seconds, defore the first repeat mouse button down event should be triggered when autorepeat is enabled.
  1975.  
  1976.     \return
  1977.         Nothing.
  1978.     */
  1979.     void   setAutoRepeatDelay(float delay);
  1980.  
  1981.     
  1982.     /*!
  1983.     \brief
  1984.         Set the current auto-repeat rate setting for this window.
  1985.  
  1986.     \param rate
  1987.         float value indicating the rate, in seconds, at which repeat mouse button down events should be generated after the initial delay has expired.
  1988.  
  1989.     \return
  1990.         Nothing.
  1991.     */
  1992.     void   setAutoRepeatRate(float rate);
  1993.  
  1994.  
  1995.     /*!
  1996.     \brief
  1997.         Set whether the window wants inputs passed to its attached
  1998.         child windows when the window has inputs captured.
  1999.  
  2000.     \param setting
  2001.         - true if System should pass captured input events to child windows.
  2002.         - false if System should pass captured input events to this window only.
  2003.     */
  2004.     void    setDistributesCapturedInputs(bool setting);
  2005.  
  2006.     /*!
  2007.     \brief
  2008.         Internal support method for drag & drop.  You do not normally call
  2009.         this directly from client code.  See the DragContainer class.
  2010.     */
  2011.     void    notifyDragDropItemEnters(DragContainer* item);
  2012.  
  2013.     /*!
  2014.     \brief
  2015.         Internal support method for drag & drop.  You do not normally call
  2016.         this directly from client code.  See the DragContainer class.
  2017.     */
  2018.     void    notifyDragDropItemLeaves(DragContainer* item);
  2019.  
  2020.     /*!
  2021.     \brief
  2022.         Internal support method for drag & drop.  You do not normally call
  2023.         this directly from client code.  See the DragContainer class.
  2024.     */
  2025.     void    notifyDragDropItemDropped(DragContainer* item);
  2026.  
  2027.     /*!
  2028.     \brief
  2029.         Internal destroy method which actually just adds the window and any 
  2030.         parent destructed child windows to the dead pool.
  2031.  
  2032.         This is virtual to allow for specialised cleanup which may be required
  2033.         in some advanced cases.  If you override this for the above reason, you
  2034.         MUST call this base class version.
  2035.         
  2036.     \note
  2037.         You never have to call this method yourself, use WindowManager to
  2038.         destroy your Window objects (which will call this for you).
  2039.     */
  2040.     virtual void    destroy(void);
  2041.  
  2042.     /*!
  2043.     \brief
  2044.         Set the custom Tooltip object for this Window.  This value may be NULL to indicate that the
  2045.         Window should use the system default Tooltip object.
  2046.  
  2047.     \param tooltip
  2048.         Pointer to a valid Tooltip based object which should be used as the tooltip for this Window, or NULL to
  2049.         indicate that the Window should use the system default Tooltip object.  Note that when passing a pointer
  2050.         to a Tooltip object, ownership of the Tooltip does not pass to this Window object.
  2051.  
  2052.     \return
  2053.         Nothing.
  2054.     */
  2055.     void setTooltip(Tooltip* tooltip);
  2056.  
  2057.     /*!
  2058.     \brief
  2059.         Set the custom Tooltip to be used by this Window by specifying a Window type.
  2060.  
  2061.         The Window will internally attempt to create an instance of the specified window type (which must be
  2062.         derived from the base Tooltip class).  If the Tooltip creation fails, the error is logged and the
  2063.         Window will revert to using either the existing custom Tooltip or the system default Tooltip.
  2064.  
  2065.     \param tooltipType
  2066.         String object holding the name of the Tooltip based Window type which should be used as the Tooltip for
  2067.         this Window.
  2068.  
  2069.     \return
  2070.         Nothing.
  2071.     */
  2072.     void setTooltipType(const String& tooltipType);
  2073.  
  2074.     /*!
  2075.     \brief
  2076.         Set the tooltip text for this window.
  2077.  
  2078.     \param tip
  2079.         String object holding the text to be displayed in the tooltip for this Window.
  2080.  
  2081.     \return
  2082.         Nothing.
  2083.     */
  2084.     void setTooltipText(const String& tip);
  2085.  
  2086.     /*!
  2087.     \brief
  2088.         Set whether this window inherits Tooltip text from its parent when its own tooltip text is not set.
  2089.  
  2090.     \param setting
  2091.         - true if the window should inherit tooltip text from its parent when its own text is not set.
  2092.         - false if the window should not inherit tooltip text from its parent (and so show no tooltip when no text is set).
  2093.  
  2094.     \return
  2095.         Nothing.
  2096.      */
  2097.     void setInheritsTooltipText(bool setting);
  2098.  
  2099.     /*!
  2100.     \brief
  2101.         Set whether this window will rise to the top of the z-order when clicked with the left mouse button.
  2102.  
  2103.     \param setting
  2104.         - true if the window should come to the top of other windows when the left mouse button is pushed within its area.
  2105.         - false if the window should not change z-order position when the left mouse button is pushed within its area.
  2106.  
  2107.     \return
  2108.         Nothing.
  2109.      */
  2110.     void setRiseOnClickEnabled(bool setting)    { d_riseOnClick = setting; }
  2111.  
  2112.     /*!
  2113.     \brief
  2114.         Set the vertical alignment.
  2115.  
  2116.         Modifies the vertical alignment for the window.  This setting affects how the windows position is
  2117.         interpreted relative to its parent.
  2118.  
  2119.     \param alignment
  2120.         One of the VerticalAlignment enumerated values.
  2121.  
  2122.     \return
  2123.         Nothing.
  2124.      */
  2125.     void setVerticalAlignment(const VerticalAlignment alignment);
  2126.  
  2127.     /*!
  2128.     \brief
  2129.         Set the horizontal alignment.
  2130.  
  2131.         Modifies the horizontal alignment for the window.  This setting affects how the windows position is
  2132.         interpreted relative to its parent.
  2133.  
  2134.     \param alignment
  2135.         One of the HorizontalAlignment enumerated values.
  2136.  
  2137.     \return
  2138.         Nothing.
  2139.      */
  2140.     void setHorizontalAlignment(const HorizontalAlignment alignment);
  2141.  
  2142.     /*!
  2143.     \brief
  2144.         Set the LookNFeel that shoule be used for this window.
  2145.  
  2146.     \param falagardType
  2147.         String object holding the mapped falagard type name (since actual window type will be "Falagard/something")
  2148.         and not what was passed to WindowManager.  This will be returned from getType instead of the base type.
  2149.  
  2150.     \param look
  2151.         String object holding the name of the look to be assigned to the window.
  2152.  
  2153.     \return
  2154.         Nothing.
  2155.  
  2156.     \exception InvalidRequestException thrown if the window already has a look assigned to it.
  2157.     */
  2158.     void setLookNFeel(const String& falagardType, const String& look);
  2159.  
  2160.     /*!
  2161.     \brief
  2162.         Set the modal state for this Window.
  2163.  
  2164.     \param state
  2165.         Boolean value defining if this Window should be the modal target.
  2166.         If true, this Window will be activated and set as the modal target.
  2167.         If false, the modal target will be cleared if this Window is currently the modal target.
  2168.  
  2169.     \return
  2170.         Nothing.
  2171.     */
  2172.     void setModalState(bool state);
  2173.  
  2174.     /*!
  2175.     \brief
  2176.         method called to perform extended laying out of attached child windows.
  2177.  
  2178.         The system may call this at various times (like when it is resized for example), and it
  2179.         may be invoked directly where required.
  2180.  
  2181.     \return
  2182.         Nothing.
  2183.     */
  2184.     virtual void performChildWindowLayout();
  2185.  
  2186.     /*!
  2187.     \brief
  2188.        Sets the value a named user string, creating it as required.
  2189.  
  2190.     \param name
  2191.         String object holding the name of the string to be returned.
  2192.  
  2193.     \param value
  2194.         String object holding the value to be assigned to the user string.
  2195.  
  2196.     \return
  2197.         Nothing.
  2198.     */
  2199.     void setUserString(const String& name, const String& value);
  2200.  
  2201.     /*************************************************************************
  2202.         Co-ordinate and Size Conversion Functions
  2203.     *************************************************************************/
  2204.     /*!
  2205.     \brief
  2206.         Convert the given X co-ordinate from absolute to relative metrics.
  2207.  
  2208.     \param val
  2209.         X co-ordinate specified in pixels relative to this Window (so 0 is this windows left edge).
  2210.  
  2211.     \return
  2212.         A relative metric value that is equivalent to \a val, given the Window objects current width.
  2213.     */
  2214.     float    absoluteToRelativeX(float val) const;
  2215.  
  2216.  
  2217.     /*!
  2218.     \brief
  2219.         Convert the given Y co-ordinate from absolute to relative metrics.
  2220.  
  2221.     \param val
  2222.         Y co-ordinate specified in pixels relative to this Window (so 0 is this windows top edge).
  2223.  
  2224.     \return
  2225.         A relative metric value that is equivalent to \a val, given the Window objects current height.
  2226.     */
  2227.     float    absoluteToRelativeY(float val) const;
  2228.  
  2229.  
  2230.     /*!
  2231.     \brief
  2232.         Convert the given position from absolute to relative metrics.
  2233.  
  2234.     \param pt
  2235.         Point object that describes a position specified in pixels relative to this Window (so 0,0 is this windows top-left corner).
  2236.  
  2237.     \return
  2238.         A Point object describing a relative metric position that is equivalent to \a pt, given the Window objects current size.
  2239.     */
  2240.     Point    absoluteToRelative(const Point& pt) const;
  2241.  
  2242.  
  2243.     /*!
  2244.     \brief
  2245.         Convert the given size from absolute to relative metrics.
  2246.  
  2247.     \param sze
  2248.         Size object that describes a size specified in pixels.
  2249.  
  2250.     \return
  2251.         A Size object describing a relative metric size that is equivalent to \a sze, given the Window objects current size.
  2252.     */
  2253.     Size    absoluteToRelative(const Size& sze) const;
  2254.  
  2255.  
  2256.     /*!
  2257.     \brief
  2258.         Convert the given area from absolute to relative metrics.
  2259.  
  2260.     \param rect
  2261.         Rect object describing the area specified in pixels relative to this Window.
  2262.  
  2263.     \return
  2264.         A Rect object describing a relative metric area that is equivalent to \a rect, given the Window objects current size.
  2265.     */
  2266.     Rect    absoluteToRelative(const Rect& rect) const;
  2267.  
  2268.  
  2269.     /*!
  2270.     \brief
  2271.         Convert the given X co-ordinate from relative to absolute metrics.
  2272.  
  2273.     \param val
  2274.         X co-ordinate specified in relative metrics for this Window (so 0 is this windows left edge).
  2275.  
  2276.     \return
  2277.         An absolute metric value that is equivalent to \a val, given the Window objects current width.
  2278.     */
  2279.     float    relativeToAbsoluteX(float val) const;
  2280.  
  2281.  
  2282.     /*!
  2283.     \brief
  2284.         Convert the given Y co-ordinate from relative to absolute metrics.
  2285.  
  2286.     \param val
  2287.         Y co-ordinate specified in relative metrics for this Window (so 0 is this windows top edge).
  2288.  
  2289.     \return
  2290.         An absolute metric value that is equivalent to \a val, given the Window objects current height.
  2291.     */
  2292.     float    relativeToAbsoluteY(float val) const;
  2293.  
  2294.  
  2295.     /*!
  2296.     \brief
  2297.         Convert the given position from relative to absolute metrics.
  2298.  
  2299.     \param pt
  2300.         Point object describing a position specified in relative metrics for this Window (so 0,0 is this windows top-left corner).
  2301.  
  2302.     \return
  2303.         A Point object describing a position in absolute metric values that is equivalent to \a pt, given the Window objects current size.
  2304.     */
  2305.     Point    relativeToAbsolute(const Point& pt) const;
  2306.  
  2307.  
  2308.     /*!
  2309.     \brief
  2310.         Convert the given size from relative to absolute metrics.
  2311.  
  2312.     \param sze
  2313.         Size object describing a size specified in relative metrics for this Window.
  2314.  
  2315.     \return
  2316.         A Size object that describes a size in absolute metric values that is equivalent to \a sze, given the Window objects current size.
  2317.     */
  2318.     Size    relativeToAbsolute(const Size& sze) const;
  2319.  
  2320.  
  2321.     /*!
  2322.     \brief
  2323.         Convert the given area from relative to absolute metrics.
  2324.  
  2325.     \param rect
  2326.         Rect object describing the area specified in relative metrics for this Window.
  2327.  
  2328.     \return
  2329.         A Rect object that describes an area in absolute metric values that is equivalent to \a rect, given the Window objects current size.
  2330.     */
  2331.     Rect    relativeToAbsolute(const Rect& rect) const;
  2332.  
  2333.  
  2334.     /*!
  2335.     \brief
  2336.         Convert a window co-ordinate value, specified in whichever metrics mode is active, to a screen relative pixel co-ordinate.
  2337.  
  2338.     \param x
  2339.         x co-ordinate value to be converted
  2340.  
  2341.     \return
  2342.         float value describing a pixel screen co-ordinate that is equivalent to window co-ordinate \a x.
  2343.     */
  2344.     float    windowToScreenX(float x) const;
  2345.  
  2346.  
  2347.     /*!
  2348.     \brief
  2349.         Convert a window co-ordinate value, specified in whichever metrics mode is active, to a screen relative pixel co-ordinate.
  2350.  
  2351.     \param y
  2352.         y co-ordinate value to be converted
  2353.  
  2354.     \return
  2355.         float value describing a screen co-ordinate that is equivalent to window co-ordinate \a y.
  2356.     */
  2357.     float    windowToScreenY(float y) const;
  2358.     
  2359.     
  2360.     /*!
  2361.     \brief
  2362.         Convert a window co-ordinate position, specified in whichever metrics mode is active, to a screen relative pixel co-ordinate position.
  2363.  
  2364.     \param pt
  2365.         Point object describing the position to be converted
  2366.  
  2367.     \return
  2368.         Point object describing a screen co-ordinate position that is equivalent to window co-ordinate position \a pt.
  2369.     */
  2370.     Point    windowToScreen(const Point& pt) const;
  2371.  
  2372.  
  2373.     /*!
  2374.     \brief
  2375.         Convert a window size value, specified in whichever metrics mode is active, to a size in pixels.
  2376.  
  2377.     \param sze
  2378.         Size object describing the size to be converted
  2379.  
  2380.     \return
  2381.         Size object describing describing a size in pixels that is equivalent to the window based size \a sze.
  2382.     */
  2383.     Size    windowToScreen(const Size& sze) const;
  2384.  
  2385.  
  2386.     /*!
  2387.     \brief
  2388.         Convert a window area, specified in whichever metrics mode is active, to a screen area.
  2389.  
  2390.     \param rect
  2391.         Rect object describing the area to be converted
  2392.  
  2393.     \return
  2394.         Rect object describing a screen area that is equivalent to window area \a rect.
  2395.     */
  2396.     Rect    windowToScreen(const Rect& rect) const;
  2397.  
  2398.  
  2399.     /*!
  2400.     \brief
  2401.         Convert a screen relative pixel co-ordinate value to a window co-ordinate value, specified in whichever metrics mode is active.
  2402.  
  2403.     \param x
  2404.         x co-ordinate value to be converted
  2405.  
  2406.     \return
  2407.         float value describing a window co-ordinate value that is equivalent to screen co-ordinate \a x.
  2408.     */
  2409.     float    screenToWindowX(float x) const;
  2410.  
  2411.  
  2412.     /*!
  2413.     \brief
  2414.         Convert a screen relative pixel co-ordinate value to a window co-ordinate value, specified in whichever metrics mode is active.
  2415.  
  2416.     \param y
  2417.         y co-ordinate value to be converted
  2418.  
  2419.     \return
  2420.         float value describing a window co-ordinate value that is equivalent to screen co-ordinate \a y.
  2421.     */
  2422.     float    screenToWindowY(float y) const;
  2423.  
  2424.  
  2425.     /*!
  2426.     \brief
  2427.         Convert a screen relative pixel position to a window co-ordinate position, specified in whichever metrics mode is active.
  2428.  
  2429.     \param pt
  2430.         Point object describing the position to be converted
  2431.  
  2432.     \return
  2433.         Point object describing a window co-ordinate position that is equivalent to screen co-ordinate \a x.
  2434.     */
  2435.     Point    screenToWindow(const Point& pt) const;
  2436.  
  2437.  
  2438.     /*!
  2439.     \brief
  2440.         Convert a pixel screen size to a window based size, specified in whichever metrics mode is active.
  2441.  
  2442.     \param sze
  2443.         Size object describing the size to be converted
  2444.  
  2445.     \return
  2446.         Size object describing a window based size that is equivalent to screen based size \a sze.
  2447.     */
  2448.     Size    screenToWindow(const Size& sze) const;
  2449.  
  2450.  
  2451.     /*!
  2452.     \brief
  2453.         Convert a screen area to a window area, specified in whichever metrics mode is active.
  2454.  
  2455.     \param rect
  2456.         Rect object describing the area to be converted
  2457.  
  2458.     \return
  2459.         Rect object describing a window area that is equivalent to screen area \a rect.
  2460.     */
  2461.     Rect    screenToWindow(const Rect& rect) const;
  2462.  
  2463.  
  2464.     /*!
  2465.     \brief
  2466.         Convert the given X co-ordinate from unified to relative metrics.
  2467.  
  2468.     \param val
  2469.         X co-ordinate specified as a UDim relative to this Window (so {0, 0} is this windows left edge).
  2470.  
  2471.     \return
  2472.         A relative metric value that is equivalent to \a val, given the Window objects current width.
  2473.     */
  2474.     float unifiedToRelativeX(const UDim& val) const;
  2475.  
  2476.  
  2477.     /*!
  2478.     \brief
  2479.         Convert the given Y co-ordinate from unified to relative metrics.
  2480.  
  2481.     \param val
  2482.         Y co-ordinate specified in as a UDim relative to this Window (so {0, 0} is this windows top edge).
  2483.  
  2484.     \return
  2485.         A relative metric value that is equivalent to \a val, given the Window objects current height.
  2486.     */
  2487.     float    unifiedToRelativeY(const UDim& val) const;
  2488.  
  2489.  
  2490.     /*!
  2491.     \brief
  2492.         Convert the given UVector2 value from unified to relative metrics.
  2493.  
  2494.     \param val
  2495.         UVector2 object that describes a position specified in unified dimensions relative to this Window (so {{0, 0}, {0, 0}) is this windows top-left corner).
  2496.  
  2497.     \return
  2498.         A Vector2 object describing a relative metric point that is equivalent to \a val, given the Window objects current size.
  2499.     */
  2500.     Vector2 unifiedToRelative(const UVector2& val) const;
  2501.  
  2502.  
  2503.     /*!
  2504.     \brief
  2505.         Convert the given area from unfied to relative metrics.
  2506.  
  2507.     \param val
  2508.         URect object describing the area specified in unified dimensions relative to this Window.
  2509.  
  2510.     \return
  2511.         A Rect object describing a relative metric area that is equivalent to \a val, given the Window objects current size.
  2512.     */
  2513.     Rect unifiedToRelative(const URect& val) const;
  2514.  
  2515.  
  2516.     /*!
  2517.     \brief
  2518.         Convert the given X co-ordinate from unified to absolute metrics.
  2519.  
  2520.     \param val
  2521.         X co-ordinate specified as a UDim relative to this Window (so {0, 0} is this windows left edge).
  2522.  
  2523.     \return
  2524.         An absolute metric value that is equivalent to \a val, given the Window objects current width.
  2525.     */
  2526.     float unifiedToAbsoluteX(const UDim& val) const;
  2527.  
  2528.  
  2529.     /*!
  2530.     \brief
  2531.         Convert the given Y co-ordinate from unified to absolute metrics.
  2532.  
  2533.     \param val
  2534.         Y co-ordinate specified in as a UDim relative to this Window (so {0, 0} is this windows top edge).
  2535.  
  2536.     \return
  2537.         An absolute metric value that is equivalent to \a val, given the Window objects current height.
  2538.     */
  2539.     float    unifiedToAbsoluteY(const UDim& val) const;
  2540.  
  2541.  
  2542.     /*!
  2543.     \brief
  2544.         Convert the given UVector2 value from unified to absolute metrics.
  2545.  
  2546.     \param val
  2547.         UVector2 object that describes a position specified in unified dimensions relative to this Window (so {{0, 0}, {0, 0}) is this windows top-left corner).
  2548.  
  2549.     \return
  2550.         A Vector2 object describing a absolute metric point that is equivalent to \a val, given the Window objects current size.
  2551.     */
  2552.     Vector2 unifiedToAbsolute(const UVector2& val) const;
  2553.  
  2554.  
  2555.     /*!
  2556.     \brief
  2557.         Convert the given area from unfied to absolute metrics.
  2558.  
  2559.     \param val
  2560.         URect object describing the area specified in unified dimensions relative to this Window.
  2561.  
  2562.     \return
  2563.         A Rect object describing an absolute metric area that is equivalent to \a val, given the Window objects current size.
  2564.     */
  2565.     Rect unifiedToAbsolute(const URect& val) const;
  2566.  
  2567.  
  2568.     /*!
  2569.     \brief
  2570.         Convert a window co-ordinate value, specified as a UDim, to a screen relative pixel co-ordinate.
  2571.  
  2572.     \param x
  2573.         UDim x co-ordinate value to be converted
  2574.  
  2575.     \return
  2576.         float value describing a pixel screen co-ordinate that is equivalent to window UDim co-ordinate \a x.
  2577.     */
  2578.     float windowToScreenX(const UDim& x) const;
  2579.  
  2580.  
  2581.     /*!
  2582.     \brief
  2583.         Convert a window co-ordinate value, specified as a UDim, to a screen relative pixel co-ordinate.
  2584.  
  2585.     \param y
  2586.         UDim y co-ordinate value to be converted
  2587.  
  2588.     \return
  2589.         float value describing a screen co-ordinate that is equivalent to window UDim co-ordinate \a y.
  2590.     */
  2591.     float windowToScreenY(const UDim& y) const;
  2592.  
  2593.  
  2594.     /*!
  2595.     \brief
  2596.         Convert a window co-ordinate point, specified as a UVector2, to a screen relative pixel co-ordinate point.
  2597.  
  2598.     \param vec
  2599.         UVector2 object describing the point to be converted
  2600.  
  2601.     \return
  2602.         Vector2 object describing a screen co-ordinate position that is equivalent to window based UVector2 \a vec.
  2603.     */
  2604.     Vector2 windowToScreen(const UVector2& vec) const;
  2605.  
  2606.  
  2607.     /*!
  2608.     \brief
  2609.         Convert a window area, specified as a URect, to a screen area.
  2610.  
  2611.     \param rect
  2612.         URect object describing the area to be converted
  2613.  
  2614.     \return
  2615.         Rect object describing a screen area that is equivalent to window area \a rect.
  2616.     */
  2617.     Rect windowToScreen(const URect& rect) const;
  2618.  
  2619.  
  2620.     /*!
  2621.     \brief
  2622.         Convert a screen relative UDim co-ordinate value to a window co-ordinate value, specified in whichever metrics mode is active.
  2623.  
  2624.     \param x
  2625.         UDim x co-ordinate value to be converted
  2626.  
  2627.     \return
  2628.         float value describing a window co-ordinate value that is equivalent to screen UDim co-ordinate \a x.
  2629.     */
  2630.     float screenToWindowX(const UDim& x) const;
  2631.  
  2632.  
  2633.     /*!
  2634.     \brief
  2635.         Convert a screen relative UDim co-ordinate value to a window co-ordinate value, specified in whichever metrics mode is active.
  2636.  
  2637.     \param y
  2638.         UDim y co-ordinate value to be converted
  2639.  
  2640.     \return
  2641.         float value describing a window co-ordinate value that is equivalent to screen UDim co-ordinate \a y.
  2642.     */
  2643.     float screenToWindowY(const UDim& y) const;
  2644.  
  2645.  
  2646.     /*!
  2647.     \brief
  2648.         Convert a screen relative UVector2 point to a window co-ordinate point, specified in whichever metrics mode is active.
  2649.  
  2650.     \param vec
  2651.         UVector2 object describing the point to be converted
  2652.  
  2653.     \return
  2654.         Vector2 object describing a window co-ordinate point that is equivalent to screen based UVector2 point \a vec.
  2655.     */
  2656.     Vector2 screenToWindow(const UVector2& vec) const;
  2657.  
  2658.  
  2659.     /*!
  2660.     \brief
  2661.         Convert a URect screen area to a window area, specified in whichever metrics mode is active.
  2662.  
  2663.     \param rect
  2664.         URect object describing the area to be converted
  2665.  
  2666.     \return
  2667.         Rect object describing a window area that is equivalent to URect screen area \a rect.
  2668.     */
  2669.     Rect screenToWindow(const URect& rect) const;
  2670.  
  2671.  
  2672.     /*************************************************************************
  2673.         Interface to unified co-ordinate system
  2674.     *************************************************************************/
  2675.     /*!
  2676.     \brief
  2677.         Set the window area.
  2678.  
  2679.         Sets the area occupied by this window.  The defined area is offset from the
  2680.         top-left corner of this windows parent window or from the top-left corner of
  2681.         the display if this window has no parent (i.e. it is the root window).
  2682.  
  2683.     \note
  2684.         This method makes use of "Unified Dimensions".  These contain both parent relative and
  2685.         absolute pixel components, which are used in determining the final value used.
  2686.  
  2687.     \param xpos
  2688.         UDim describing the new x co-ordinate (left edge) of the window area.
  2689.     
  2690.     \param ypos
  2691.         UDim describing the new y co-ordinate (top-edge) of the window area.
  2692.     
  2693.     \param width
  2694.         UDim describing the new width of the window area.
  2695.     
  2696.     \param height
  2697.         UDim describing the new height of the window area.
  2698.      */
  2699.     void setWindowArea(const UDim& xpos, const UDim& ypos, const UDim& width, const UDim& height);
  2700.     
  2701.     /*!
  2702.     \brief
  2703.         Set the window area.
  2704.  
  2705.         Sets the area occupied by this window.  The defined area is offset from the
  2706.         top-left corner of this windows parent window or from the top-left corner of
  2707.         the display if this window has no parent (i.e. it is the root window).
  2708.  
  2709.     \note
  2710.         This method makes use of "Unified Dimensions".  These contain both parent relative and
  2711.         absolute pixel components, which are used in determining the final value used.
  2712.  
  2713.     \param pos
  2714.         UVector2 describing the new position (top-left corner) of the window area.
  2715.         
  2716.     \param size
  2717.         UVector2 describing the new size of the window area.
  2718.      */
  2719.     void setWindowArea(const UVector2& pos, const UVector2& size);
  2720.     
  2721.     /*!
  2722.     \brief
  2723.         Set the window area.
  2724.  
  2725.         Sets the area occupied by this window.  The defined area is offset from the
  2726.         top-left corner of this windows parent window or from the top-left corner of
  2727.         the display if this window has no parent (i.e. it is the root window).
  2728.  
  2729.     \note
  2730.         This method makes use of "Unified Dimensions".  These contain both parent relative and
  2731.         absolute pixel components, which are used in determining the final value used.
  2732.  
  2733.     \param area
  2734.         URect describing the new area rectangle of the window area.
  2735.      */
  2736.     void setWindowArea(const URect& area);
  2737.     
  2738.     /*!
  2739.     \brief
  2740.         Set the window's position.
  2741.  
  2742.         Sets the position of the area occupied by this window.  The position is offset from the
  2743.         top-left corner of this windows parent window or from the top-left corner of
  2744.         the display if this window has no parent (i.e. it is the root window).
  2745.  
  2746.     \note
  2747.         This method makes use of "Unified Dimensions".  These contain both parent relative and
  2748.         absolute pixel components, which are used in determining the final value used.
  2749.  
  2750.     \param pos
  2751.         UVector2 describing the new position (top-left corner) of the window area.
  2752.      */
  2753.     void setWindowPosition(const UVector2& pos);
  2754.  
  2755.     /*!
  2756.     \brief
  2757.         Set the window's X position.
  2758.  
  2759.         Sets the x position (left edge) of the area occupied by this window.  The position is
  2760.         offset from the left edge of this windows parent window or from the left edge of
  2761.         the display if this window has no parent (i.e. it is the root window).
  2762.  
  2763.     \note
  2764.         This method makes use of "Unified Dimensions".  These contain both parent relative and
  2765.         absolute pixel components, which are used in determining the final value used.
  2766.  
  2767.     \param x
  2768.         UDim describing the new x position of the window area.
  2769.      */
  2770.     void setWindowXPosition(const UDim& x);
  2771.  
  2772.     /*!
  2773.     \brief
  2774.         Set the window's Y position.
  2775.  
  2776.         Sets the y position (top edge) of the area occupied by this window.  The position is
  2777.         offset from the top edge of this windows parent window or from the top edge of
  2778.         the display if this window has no parent (i.e. it is the root window).
  2779.  
  2780.     \note
  2781.         This method makes use of "Unified Dimensions".  These contain both parent relative and
  2782.         absolute pixel components, which are used in determining the final value used.
  2783.  
  2784.     \param y
  2785.         UDim describing the new y position of the window area.
  2786.      */
  2787.     void setWindowYPosition(const UDim& y);
  2788.  
  2789.     /*!
  2790.     \brief
  2791.         Set the window's size.
  2792.  
  2793.         Sets the size of the area occupied by this window.
  2794.  
  2795.     \note
  2796.         This method makes use of "Unified Dimensions".  These contain both parent relative and
  2797.         absolute pixel components, which are used in determining the final value used.
  2798.  
  2799.     \param size
  2800.         UVector2 describing the new size of the window area.
  2801.      */
  2802.     void setWindowSize(const UVector2& size);
  2803.  
  2804.     /*!
  2805.     \brief
  2806.         Set the window's width.
  2807.  
  2808.         Sets the width of the area occupied by this window.
  2809.  
  2810.     \note
  2811.         This method makes use of "Unified Dimensions".  These contain both parent relative and
  2812.         absolute pixel components, which are used in determining the final value used.
  2813.  
  2814.     \param width
  2815.         UDim describing the new width of the window area.
  2816.      */
  2817.     void setWindowWidth(const UDim& width);
  2818.  
  2819.     /*!
  2820.     \brief
  2821.         Set the window's height.
  2822.  
  2823.         Sets the height of the area occupied by this window.
  2824.  
  2825.     \note
  2826.         This method makes use of "Unified Dimensions".  These contain both parent relative and
  2827.         absolute pixel components, which are used in determining the final value used.
  2828.  
  2829.     \param height
  2830.         UDim describing the new height of the window area.
  2831.      */
  2832.     void setWindowHeight(const UDim& height);
  2833.  
  2834.     /*!
  2835.     \brief
  2836.         Set the window's maximum size.
  2837.  
  2838.         Sets the maximum size that this windows area may occupy (whether size changes occur by user
  2839.         interaction, general system operation, or by direct setting by client code).
  2840.  
  2841.     \note
  2842.         This method makes use of "Unified Dimensions".  These contain both parent relative and
  2843.         absolute pixel components, which are used in determining the final value used.
  2844.  
  2845.     \param size
  2846.         UVector2 describing the new maximum size of the window area.
  2847.      */
  2848.     void setWindowMaxSize(const UVector2& size);
  2849.  
  2850.     /*!
  2851.     \brief
  2852.         Set the window's minimum size.
  2853.  
  2854.         Sets the minimum size that this windows area may occupy (whether size changes occur by user
  2855.         interaction, general system operation, or by direct setting by client code).
  2856.  
  2857.     \note
  2858.         This method makes use of "Unified Dimensions".  These contain both parent relative and
  2859.         absolute pixel components, which are used in determining the final value used.
  2860.  
  2861.     \param size
  2862.         UVector2 describing the new minimum size of the window area.
  2863.      */
  2864.     void setWindowMinSize(const UVector2& size);
  2865.  
  2866.     /*!
  2867.     \brief
  2868.         Return the windows area.
  2869.  
  2870.         Returns the area occupied by this window.  The defined area is offset from the
  2871.         top-left corner of this windows parent window or from the top-left corner of
  2872.         the display if this window has no parent (i.e. it is the root window).
  2873.  
  2874.     \note
  2875.         This method makes use of "Unified Dimensions".  These contain both parent relative and
  2876.         absolute pixel components, which are used in determining the final value used.
  2877.  
  2878.     \return
  2879.         URect describing the rectangle of the window area.
  2880.      */
  2881.     const URect& getWindowArea() const;
  2882.  
  2883.     /*!
  2884.     \brief
  2885.         Get the window's position.
  2886.  
  2887.         Gets the position of the area occupied by this window.  The position is offset from the
  2888.         top-left corner of this windows parent window or from the top-left corner of
  2889.         the display if this window has no parent (i.e. it is the root window).
  2890.  
  2891.     \note
  2892.         This method makes use of "Unified Dimensions".  These contain both parent relative and
  2893.         absolute pixel components, which are used in determining the final value used.
  2894.  
  2895.     \return
  2896.         UVector2 describing the position (top-left corner) of the window area.
  2897.      */
  2898.     const UVector2& getWindowPosition() const;
  2899.  
  2900.     /*!
  2901.     \brief
  2902.         Get the window's X position.
  2903.  
  2904.         Gets the x position (left edge) of the area occupied by this window.  The position is
  2905.         offset from the left edge of this windows parent window or from the left edge of
  2906.         the display if this window has no parent (i.e. it is the root window).
  2907.  
  2908.     \note
  2909.         This method makes use of "Unified Dimensions".  These contain both parent relative and
  2910.         absolute pixel components, which are used in determining the final value used.
  2911.  
  2912.     \return
  2913.         UDim describing the x position of the window area.
  2914.      */
  2915.     const UDim& getWindowXPosition() const;
  2916.  
  2917.     /*!
  2918.     \brief
  2919.         Get the window's Y position.
  2920.  
  2921.         Gets the y position (top edge) of the area occupied by this window.  The position is
  2922.         offset from the top edge of this windows parent window or from the top edge of
  2923.         the display if this window has no parent (i.e. it is the root window).
  2924.  
  2925.     \note
  2926.         This method makes use of "Unified Dimensions".  These contain both parent relative and
  2927.         absolute pixel components, which are used in determining the final value used.
  2928.  
  2929.     \return
  2930.         UDim describing the y position of the window area.
  2931.      */
  2932.     const UDim& getWindowYPosition() const;
  2933.  
  2934.     /*!
  2935.     \brief
  2936.         Get the window's size.
  2937.  
  2938.         Gets the size of the area occupied by this window.
  2939.  
  2940.     \note
  2941.         This method makes use of "Unified Dimensions".  These contain both parent relative and
  2942.         absolute pixel components, which are used in determining the final value used.
  2943.  
  2944.     \return
  2945.         UVector2 describing the size of the window area.
  2946.      */
  2947.     UVector2 getWindowSize() const;
  2948.  
  2949.     /*!
  2950.     \brief
  2951.         Get the window's width.
  2952.  
  2953.         Gets the width of the area occupied by this window.
  2954.  
  2955.     \note
  2956.         This method makes use of "Unified Dimensions".  These contain both parent relative and
  2957.         absolute pixel components, which are used in determining the final value used.
  2958.  
  2959.     \return
  2960.         UDim describing the width of the window area.
  2961.      */
  2962.     UDim getWindowWidth() const;
  2963.  
  2964.     /*!
  2965.     \brief
  2966.         Get the window's height.
  2967.  
  2968.         Gets the height of the area occupied by this window.
  2969.  
  2970.     \note
  2971.         This method makes use of "Unified Dimensions".  These contain both parent relative and
  2972.         absolute pixel components, which are used in determining the final value used.
  2973.  
  2974.     \return
  2975.         UDim describing the height of the window area.
  2976.      */
  2977.     UDim getWindowHeight() const;
  2978.  
  2979.     /*!
  2980.     \brief
  2981.         Get the window's maximum size.
  2982.  
  2983.         Gets the maximum size that this windows area may occupy (whether size changes occur by user
  2984.         interaction, general system operation, or by direct setting by client code).
  2985.  
  2986.     \note
  2987.         This method makes use of "Unified Dimensions".  These contain both parent relative and
  2988.         absolute pixel components, which are used in determining the final value used.
  2989.  
  2990.     \return
  2991.         UVector2 describing the maximum size of the window area.
  2992.      */
  2993.     const UVector2& getWindowMaxSize() const;
  2994.  
  2995.     /*!
  2996.     \brief
  2997.         Get the window's minimum size.
  2998.  
  2999.         Gets the minimum size that this windows area may occupy (whether size changes occur by user
  3000.         interaction, general system operation, or by direct setting by client code).
  3001.  
  3002.     \note
  3003.         This method makes use of "Unified Dimensions".  These contain both parent relative and
  3004.         absolute pixel components, which are used in determining the final value used.
  3005.  
  3006.     \return
  3007.         UVector2 describing the minimum size of the window area.
  3008.      */
  3009.     const UVector2& getWindowMinSize() const;
  3010.  
  3011.  
  3012.     /*************************************************************************
  3013.         Main render function.
  3014.     *************************************************************************/
  3015.     /*!
  3016.     \brief
  3017.         Causes the Window object to render itself and all of it's attached children
  3018.  
  3019.     \return
  3020.         Nothing
  3021.     */
  3022.     void    render(void);
  3023.  
  3024.  
  3025.     /*!
  3026.     \brief
  3027.         Cause window to update itself and any attached children.  Client code does not need to call this method; to
  3028.         ensure full, and proper updates, call the injectTimePulse methodname method provided by the System class.
  3029.  
  3030.     \note
  3031.         The update order is such that 'this' window is updated prior to any child windows, this is so
  3032.         that child windows that access the parent in their update code get the correct updated state.
  3033.  
  3034.     \param elapsed
  3035.         float value indicating the number of seconds passed since the last update.
  3036.  
  3037.     \return
  3038.         Nothing.
  3039.     */
  3040.     void    update(float elapsed);
  3041.  
  3042.  
  3043.     /*!
  3044.     \brief
  3045.         Writes an xml representation of this window object to \a out_stream.
  3046.  
  3047.     \param out_stream
  3048.         Stream where xml data should be output.
  3049.  
  3050.     \return
  3051.         Nothing.
  3052.     */
  3053.     virtual void writeXMLToStream(OutStream& out_stream) const;
  3054.  
  3055. protected:
  3056.     /*************************************************************************
  3057.         System object can trigger events directly
  3058.     *************************************************************************/
  3059.     friend    class System;
  3060.  
  3061.  
  3062.     /*************************************************************************
  3063.         Event trigger methods
  3064.     *************************************************************************/
  3065.     /*!
  3066.     \brief
  3067.         Handler called when the window's size changes.
  3068.  
  3069.     \param e
  3070.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3071.         event the trigger window is always 'this'.
  3072.     */
  3073.     virtual void    onSized(WindowEventArgs& e);
  3074.  
  3075.  
  3076.     /*!
  3077.     \brief
  3078.         Handler called when the window's position changes.
  3079.  
  3080.     \param e
  3081.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3082.         event the trigger window is always 'this'.
  3083.     */
  3084.     virtual void    onMoved(WindowEventArgs& e);
  3085.  
  3086.  
  3087.     /*!
  3088.     \brief
  3089.         Handler called when the window's text is changed.
  3090.  
  3091.     \param e
  3092.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3093.         event the trigger window is always 'this'.
  3094.     */
  3095.     virtual void    onTextChanged(WindowEventArgs& e);
  3096.  
  3097.  
  3098.     /*!
  3099.     \brief
  3100.         Handler called when the window's font is changed.
  3101.  
  3102.     \param e
  3103.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3104.         event the trigger window is always 'this'.
  3105.     */
  3106.     virtual void    onFontChanged(WindowEventArgs& e);
  3107.  
  3108.  
  3109.     /*!
  3110.     \brief
  3111.         Handler called when the window's alpha blend value is changed.
  3112.  
  3113.     \param e
  3114.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3115.         event the trigger window is always 'this'.
  3116.     */
  3117.     virtual void    onAlphaChanged(WindowEventArgs& e);
  3118.  
  3119.  
  3120.     /*!
  3121.     \brief
  3122.         Handler called when the window's client assigned ID is changed.
  3123.  
  3124.     \param e
  3125.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3126.         event the trigger window is always 'this'.
  3127.     */
  3128.     virtual void    onIDChanged(WindowEventArgs& e);
  3129.  
  3130.  
  3131.     /*!
  3132.     \brief
  3133.         Handler called when the window is shown (made visible).
  3134.  
  3135.     \param e
  3136.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3137.         event the trigger window is always 'this'.
  3138.     */
  3139.     virtual void    onShown(WindowEventArgs& e);
  3140.  
  3141.  
  3142.     /*!
  3143.     \brief
  3144.         Handler called when the window is hidden.
  3145.  
  3146.     \param e
  3147.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3148.         event the trigger window is always 'this'.
  3149.     */
  3150.     virtual void    onHidden(WindowEventArgs& e);
  3151.  
  3152.  
  3153.     /*!
  3154.     \brief
  3155.         Handler called when the window is enabled.
  3156.  
  3157.     \param e
  3158.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3159.         event the trigger window is always 'this'.
  3160.     */
  3161.     virtual void    onEnabled(WindowEventArgs& e);
  3162.  
  3163.  
  3164.     /*!
  3165.     \brief
  3166.         Handler called when the window is disabled.
  3167.  
  3168.     \param e
  3169.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3170.         event the trigger window is always 'this'.
  3171.     */
  3172.     virtual void    onDisabled(WindowEventArgs& e);
  3173.  
  3174.  
  3175.     /*!
  3176.     \brief
  3177.         Handler called when the window's active metrics system is changed.
  3178.  
  3179.     \param e
  3180.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3181.         event the trigger window is always 'this'.
  3182.     */
  3183.     virtual void    onMetricsChanged(WindowEventArgs& e);
  3184.  
  3185.  
  3186.     /*!
  3187.     \brief
  3188.         Handler called when the window's setting for being clipped by it's parent is changed.
  3189.  
  3190.     \param e
  3191.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3192.         event the trigger window is always 'this'.
  3193.     */
  3194.     virtual void    onClippingChanged(WindowEventArgs& e);
  3195.  
  3196.  
  3197.     /*!
  3198.     \brief
  3199.         Handler called when the window's setting for being destroyed automatically be it's parent is changed.
  3200.  
  3201.     \param e
  3202.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3203.         event the trigger window is always 'this'.
  3204.     */
  3205.     virtual void    onParentDestroyChanged(WindowEventArgs& e);
  3206.  
  3207.  
  3208.     /*!
  3209.     \brief
  3210.         Handler called when the window's setting for inheriting alpha-blending is changed.
  3211.  
  3212.     \param e
  3213.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3214.         event the trigger window is always 'this'.
  3215.     */
  3216.     virtual void    onInheritsAlphaChanged(WindowEventArgs& e);
  3217.  
  3218.  
  3219.     /*!
  3220.     \brief
  3221.         Handler called when the window's always-on-top setting is changed.
  3222.  
  3223.     \param e
  3224.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3225.         event the trigger window is always 'this'.
  3226.     */
  3227.     virtual void    onAlwaysOnTopChanged(WindowEventArgs& e);
  3228.  
  3229.  
  3230.     /*!
  3231.     \brief
  3232.         Handler called when this window gains capture of mouse inputs.
  3233.  
  3234.     \param e
  3235.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3236.         event the trigger window is always 'this'.
  3237.     */
  3238.     virtual void    onCaptureGained(WindowEventArgs& e);
  3239.  
  3240.  
  3241.     /*!
  3242.     \brief
  3243.         Handler called when this window loses capture of mouse inputs.
  3244.  
  3245.     \param e
  3246.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3247.         event the trigger window is always 'this'.
  3248.     */
  3249.     virtual void    onCaptureLost(WindowEventArgs& e);
  3250.  
  3251.  
  3252.     /*!
  3253.     \brief
  3254.         Handler called when rendering for this window has started.
  3255.  
  3256.     \param e
  3257.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3258.         event the trigger window is always 'this'.
  3259.     */
  3260.     virtual void    onRenderingStarted(WindowEventArgs& e);
  3261.  
  3262.  
  3263.     /*!
  3264.     \brief
  3265.         Handler called when rendering for this window has ended.
  3266.  
  3267.     \param e
  3268.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3269.         event the trigger window is always 'this'.
  3270.     */
  3271.     virtual void    onRenderingEnded(WindowEventArgs& e);
  3272.  
  3273.  
  3274.     /*!
  3275.     \brief
  3276.         Handler called when the z-order position of this window has changed.
  3277.  
  3278.     \param e
  3279.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3280.         event the trigger window is always 'this'.
  3281.     */
  3282.     virtual void    onZChanged(WindowEventArgs& e);
  3283.  
  3284.  
  3285.     /*!
  3286.     \brief
  3287.         Handler called when this window's destruction sequence has begun.
  3288.  
  3289.     \param e
  3290.         WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event.  For this
  3291.         event the trigger window is always 'this'.
  3292.     */
  3293.     virtual void    onDestructionStarted(WindowEventArgs& e);
  3294.  
  3295.  
  3296.     /*!
  3297.     \brief
  3298.         Handler called when this window has become the active window.
  3299.  
  3300.     \param e
  3301.         ActivationEventArgs class whose 'otherWindow' field is set to the window that previously was active, or NULL for none.
  3302.     */
  3303.     virtual void    onActivated(ActivationEventArgs& e);
  3304.  
  3305.  
  3306.     /*!
  3307.     \brief
  3308.         Handler called when this window has lost input focus and has been deactivated.
  3309.  
  3310.     \param e
  3311.         ActivationEventArgs object whose 'otherWindow' field is set to the window that has now become active, or NULL for none.
  3312.     */
  3313.     virtual void    onDeactivated(ActivationEventArgs& e);
  3314.  
  3315.  
  3316.     /*!
  3317.     \brief
  3318.         Handler called when this window's parent window has been resized.  If this window is the root / GUI Sheet
  3319.         window, this call will be made when the screen size changes.
  3320.  
  3321.     \param e
  3322.         WindowEventArgs object whose 'window' pointer field is set the the window that caused the event; this is typically either
  3323.         this window's parent window, or NULL to indicate the screen size has changed.
  3324.     */
  3325.     virtual void    onParentSized(WindowEventArgs& e);
  3326.  
  3327.  
  3328.     /*!
  3329.     \brief
  3330.         Handler called when a child window is added to this window.
  3331.  
  3332.     \param e
  3333.         WindowEventArgs object whose 'window' pointer field is set to the window that has been added.
  3334.     */
  3335.     virtual void    onChildAdded(WindowEventArgs& e);
  3336.  
  3337.  
  3338.     /*!
  3339.     \brief
  3340.         Handler called when a child window is removed from this window.
  3341.  
  3342.     \param e
  3343.         WindowEventArgs object whose 'window' pointer field is set the window that has been removed.
  3344.     */
  3345.     virtual void    onChildRemoved(WindowEventArgs& e);
  3346.  
  3347.  
  3348.     /*!
  3349.     \brief
  3350.         Handler called when the mouse cursor has entered this window's area.
  3351.  
  3352.     \param e
  3353.         MouseEventArgs object.  All fields are valid.
  3354.     */
  3355.     virtual void    onMouseEnters(MouseEventArgs& e);
  3356.  
  3357.  
  3358.     /*!
  3359.     \brief
  3360.         Handler called when the mouse cursor has left this window's area.
  3361.  
  3362.     \param e
  3363.         MouseEventArgs object.  All fields are valid.
  3364.     */
  3365.     virtual void    onMouseLeaves(MouseEventArgs& e);
  3366.  
  3367.  
  3368.     /*!
  3369.     \brief
  3370.         Handler called when the mouse cursor has been moved within this window's area.
  3371.  
  3372.     \param e
  3373.         MouseEventArgs object.  All fields are valid.
  3374.     */
  3375.     virtual void    onMouseMove(MouseEventArgs& e);
  3376.  
  3377.  
  3378.     /*!
  3379.     \brief
  3380.         Handler called when the mouse wheel (z-axis) position changes within this window's area.
  3381.  
  3382.     \param e
  3383.         MouseEventArgs object.  All fields are valid.
  3384.     */
  3385.     virtual void    onMouseWheel(MouseEventArgs& e);
  3386.  
  3387.  
  3388.     /*!
  3389.     \brief
  3390.         Handler called when a mouse button has been depressed within this window's area.
  3391.  
  3392.     \param e
  3393.         MouseEventArgs object.  All fields are valid.
  3394.     */
  3395.     virtual void    onMouseButtonDown(MouseEventArgs& e);
  3396.  
  3397.  
  3398.     /*!
  3399.     \brief
  3400.         Handler called when a mouse button has been released within this window's area.
  3401.  
  3402.     \param e
  3403.         MouseEventArgs object.  All fields are valid.
  3404.     */
  3405.     virtual void    onMouseButtonUp(MouseEventArgs& e);
  3406.  
  3407.  
  3408.     /*!
  3409.     \brief
  3410.         Handler called when a mouse button has been clicked (that is depressed and then released, within a specified time)
  3411.         within this window's area.
  3412.  
  3413.     \param e
  3414.         MouseEventArgs object.  All fields are valid.
  3415.     */
  3416.     virtual void    onMouseClicked(MouseEventArgs& e);
  3417.  
  3418.  
  3419.     /*!
  3420.     \brief
  3421.         Handler called when a mouse button has been double-clicked within this window's area.
  3422.  
  3423.     \param e
  3424.         MouseEventArgs object.  All fields are valid.
  3425.     */
  3426.     virtual void    onMouseDoubleClicked(MouseEventArgs& e);
  3427.  
  3428.  
  3429.     /*!
  3430.     \brief
  3431.         Handler called when a mouse button has been triple-clicked within this window's area.
  3432.  
  3433.     \param e
  3434.         MouseEventArgs object.  All fields are valid.
  3435.     */
  3436.     virtual void    onMouseTripleClicked(MouseEventArgs& e);
  3437.  
  3438.  
  3439.     /*!
  3440.     \brief
  3441.         Handler called when a key as been depressed while this window has input focus.
  3442.  
  3443.     \param e
  3444.         KeyEventArgs object whose 'scancode' field is set to the Key::Scan value representing the key that was pressed, and whose
  3445.         'sysKeys' field represents the combination of SystemKey that were active when the event was generated.
  3446.     */
  3447.     virtual void    onKeyDown(KeyEventArgs& e);
  3448.  
  3449.  
  3450.     /*!
  3451.     \brief
  3452.         Handler called when a key as been released while this window has input focus.
  3453.  
  3454.     \param e
  3455.         KeyEventArgs object whose 'scancode' field is set to the Key::Scan value representing the key that was released, and whose
  3456.         'sysKeys' field represents the combination of SystemKey that were active when the event was generated.  All other fields should be
  3457.         considered as 'junk'.
  3458.     */
  3459.     virtual void    onKeyUp(KeyEventArgs& e);
  3460.  
  3461.  
  3462.     /*!
  3463.     \brief
  3464.         Handler called when a character-key has been pressed while this window has input focus.
  3465.  
  3466.     \param e
  3467.         KeyEventArgs object whose 'codepoint' field is set to the Unicode code point (encoded as utf32) for the character typed, and whose
  3468.         'sysKeys' field represents the combination of SystemKey that were active when the event was generated.  All other fields should be
  3469.         considered as 'junk'.
  3470.     */
  3471.     virtual void    onCharacter(KeyEventArgs& e);
  3472.  
  3473.     /*!
  3474.     \brief
  3475.         Handler called when a DragContainer is dragged over this window.
  3476.  
  3477.     \param e
  3478.         DragDropEventArgs object initialised as follows:
  3479.         - window field is normaly set to point to 'this' window.
  3480.         - dragDropItem is a pointer to a DragContainer window that triggered the event.
  3481.     */
  3482.     virtual void    onDragDropItemEnters(DragDropEventArgs& e);
  3483.  
  3484.  
  3485.     /*!
  3486.     \brief
  3487.         Handler called when a DragContainer is dragged over this window.
  3488.  
  3489.     \param e
  3490.         DragDropEventArgs object initialised as follows:
  3491.         - window field is normaly set to point to 'this' window.
  3492.         - dragDropItem is a pointer to a DragContainer window that triggered the event.
  3493.     */
  3494.     virtual void    onDragDropItemLeaves(DragDropEventArgs& e);
  3495.  
  3496.  
  3497.     /*!
  3498.     \brief
  3499.         Handler called when a DragContainer is dragged over this window.
  3500.  
  3501.     \param e
  3502.         DragDropEventArgs object initialised as follows:
  3503.         - window field is normaly set to point to 'this' window.
  3504.         - dragDropItem is a pointer to a DragContainer window that triggered the event.
  3505.     */
  3506.     virtual void    onDragDropItemDropped(DragDropEventArgs& e);
  3507.  
  3508.     
  3509.     /*!
  3510.     \brief
  3511.         Handler called when the vertical alignment setting for the window is changed.
  3512.  
  3513.     \param e
  3514.         WindowEventArgs object initialised as follows:
  3515.         - window field is set to point to the Window object whos alignment has changed (typically 'this').
  3516.     */
  3517.     virtual void    onVerticalAlignmentChanged(WindowEventArgs& e);
  3518.  
  3519.     
  3520.     /*!
  3521.     \brief
  3522.         Handler called when the horizontal alignment setting for the window is changed.
  3523.  
  3524.     \param e
  3525.         WindowEventArgs object initialised as follows:
  3526.         - window field is set to point to the Window object whos alignment has changed (typically 'this').
  3527.     */
  3528.     virtual void    onHorizontalAlignmentChanged(WindowEventArgs& e);
  3529.  
  3530.     
  3531.     /*************************************************************************
  3532.         Implementation Functions
  3533.     *************************************************************************/
  3534.     /*!
  3535.     \brief
  3536.         Perform actual update processing for this Window.
  3537.  
  3538.     \param elapsed
  3539.         float value indicating the number of seconds elapsed since the last update call.
  3540.  
  3541.     \return
  3542.         Nothing.
  3543.     */
  3544.     virtual void    updateSelf(float elapsed);
  3545.  
  3546.  
  3547.     /*!
  3548.     \brief
  3549.         Perform the actual rendering for this Window.
  3550.  
  3551.     \param z
  3552.         float value specifying the base Z co-ordinate that should be used when rendering
  3553.  
  3554.     \return
  3555.         Nothing
  3556.     */
  3557.     virtual    void    drawSelf(float z);
  3558.  
  3559.  
  3560.     /*!
  3561.     \brief
  3562.        Update the rendering cache.
  3563.  
  3564.        Populates the Window's RenderCache with imagery to be sent to the renderer.
  3565.     */
  3566.     virtual void populateRenderCache()  {}
  3567.  
  3568.  
  3569.     /*!
  3570.     \brief
  3571.         Return whether this window was inherited from the given class name at some point in the inheritance heirarchy.
  3572.  
  3573.     \param class_name
  3574.         The class name that is to be checked.
  3575.  
  3576.     \return
  3577.         true if this window was inherited from \a class_name. false if not.
  3578.     */
  3579.     virtual bool    testClassName_impl(const String& class_name) const
  3580.     {
  3581.         if (class_name==(const utf8*)"Window")    return true;
  3582.         return false;
  3583.     }
  3584.  
  3585.  
  3586.     /*!
  3587.     \brief
  3588.         Set the parent window for this window object.
  3589.  
  3590.     \param parent
  3591.         Pointer to a Window object that is to be assigned as the parent to this Window.
  3592.  
  3593.     \return
  3594.         Nothing
  3595.     */
  3596.     void    setParent(Window* parent);
  3597.  
  3598.  
  3599.     /*!
  3600.     \brief
  3601.         Return the pixel Width of the parent element.  This always returns a valid number.
  3602.  
  3603.     \return
  3604.         float value that is equal to the pixel width of this Window objects parent
  3605.     */
  3606.     float    getParentWidth(void) const;
  3607.  
  3608.  
  3609.     /*!
  3610.     \brief
  3611.         Return the pixel Height of the parent element.  This always returns a valid number.
  3612.  
  3613.     \return
  3614.         float value that is equal to the pixel height of this Window objects parent
  3615.     */
  3616.     float    getParentHeight(void) const;
  3617.  
  3618.  
  3619.     /*!
  3620.     \brief
  3621.         Return the pixel size of the parent element.  This always returns a valid object.
  3622.  
  3623.     \return
  3624.         Size object that describes the pixel dimensions of this Window objects parent
  3625.     */
  3626.     Size    getParentSize(void) const;
  3627.  
  3628.  
  3629.     /*!
  3630.     \brief
  3631.         Return a Rect object that describes, in values relative to \a window, the absolute area described by \a rect.
  3632.  
  3633.     \param window
  3634.         Pointer to a window object that is to be used as the base for the conversion.  If this is NULL then the size of the
  3635.         display, as returned by the renderer object, is used.
  3636.  
  3637.     \param rect
  3638.         Rect object describing the area, in absolute values, that is to be returned as relative values.
  3639.  
  3640.     \return
  3641.         Rect object that describes in values relative to \a window, the same area described as absolute values in \a rect.
  3642.     */
  3643.     Rect    absoluteToRelative_impl(const Window* window, const Rect& rect) const;
  3644.     Size    absoluteToRelative_impl(const Window* window, const Size& sz) const;
  3645.     Point    absoluteToRelative_impl(const Window* window, const Point& pt) const;
  3646.     float    absoluteToRelativeX_impl(const Window* window, float x) const;
  3647.     float    absoluteToRelativeY_impl(const Window* window, float y) const;
  3648.  
  3649.  
  3650.     /*!
  3651.     \brief
  3652.         Return a Rect object that describes, in absolute values offset from \a window, the relative area described by \a rect.
  3653.  
  3654.     \param window
  3655.         Pointer to a window object that is to be used as the base for the conversion.  If this is NULL then the size of the
  3656.         display, as returned by the renderer object, is used.
  3657.  
  3658.     \param rect
  3659.         Rect object describing the area, in relative values, that is to be returned as absolute values.
  3660.  
  3661.     \return
  3662.         Rect object that describes in absolute values offset from \a window, the same area described as relative values in \a rect.
  3663.     */
  3664.     Rect    relativeToAbsolute_impl(const Window* window, const Rect& rect) const;
  3665.     Size    relativeToAbsolute_impl(const Window* window, const Size& sz) const;
  3666.     Point    relativeToAbsolute_impl(const Window* window, const Point& pt) const;
  3667.     float    relativeToAbsoluteX_impl(const Window* window, float x) const;
  3668.     float    relativeToAbsoluteY_impl(const Window* window, float y) const;
  3669.  
  3670.     Size    getWindowSize_impl(const Window* window) const;
  3671.  
  3672.  
  3673.     /*!
  3674.     \brief
  3675.         Return the inherited metrics mode.  This is either the metrics mode of our parent, or Relative
  3676.         if we have no parent.
  3677.     */
  3678.     MetricsMode getInheritedMetricsMode(void) const;
  3679.  
  3680.     
  3681.     /*!
  3682.     \brief
  3683.         Fires off a repeated mouse button down event for this window.
  3684.     */
  3685.     void    generateAutoRepeatEvent(MouseButton button);
  3686.  
  3687.  
  3688.     /*************************************************************************
  3689.         Implementation Data
  3690.     *************************************************************************/
  3691.     // child stuff
  3692.     typedef    std::vector<Window*>    ChildList;
  3693.     ChildList        d_children;            //!< The list of child Window objects attached to this.
  3694.     ChildList       d_drawList;         //!< Child window objects arranged in rendering order.
  3695.  
  3696.     // general data
  3697.     MetricsMode        d_metricsMode;        //!< Holds the active metrics mode for this window
  3698.     static Window*    d_captureWindow;    //!< Window that has captured inputs
  3699.     Window*            d_oldCapture;        //!< The Window that previously had capture (used for restoreOldCapture mode)
  3700.     Window*            d_parent;            //!< Holds pointer to the parent window.
  3701.     const Font*        d_font;                //!< Holds pointer to the Window objects current Font.
  3702.     String            d_text;                //!< Holds the text / label / caption for this Window.
  3703.     uint            d_ID;                //!< User ID assigned to this Window
  3704.     float            d_alpha;            //!< Alpha transparency setting for the Window
  3705.     URect            d_area;             //!< This Window objects area as defined by a URect.
  3706.     Size            d_pixelSize;        //!< Current constrained pixel size of the window.
  3707.     const Image*    d_mouseCursor;        //!< Holds pointer to the Window objects current mouse cursor image.
  3708.     void*            d_userData;            //!< Holds pointer to some user assigned data.
  3709.  
  3710.     typedef std::map<String, String>   UserStringMap;
  3711.     UserStringMap  d_userStrings;      //!< Holds a collection of named user string values.
  3712.  
  3713.     // positional alignments
  3714.     HorizontalAlignment d_horzAlign;    //!< Specifies the base for horizontal alignment.
  3715.     VerticalAlignment   d_vertAlign;    //!< Specifies the base for vertical alignment.
  3716.     
  3717.     // maximum and minimum sizes
  3718.     UVector2       d_minSize;          //!< current minimum size for the window.
  3719.     UVector2       d_maxSize;          //!< current maximum size for the window.
  3720.  
  3721.     // settings
  3722.     bool    d_enabled;                    //!< true when Window is enabled
  3723.     bool    d_visible;                    //!< true when Window is visible (that is it will be rendered, but may be obscured so no necesarily really visible)
  3724.     bool    d_active;                    //!< true when Window is the active Window (receiving inputs).
  3725.     bool    d_clippedByParent;            //!< true when Window will be clipped by parent Window area Rect.
  3726.     bool    d_destroyedByParent;        //!< true when Window will be auto-destroyed by parent.
  3727.     bool    d_alwaysOnTop;                //!< true if Window will be drawn on top of all other Windows
  3728.     bool    d_inheritsAlpha;            //!< true if the Window inherits alpha from the parent Window
  3729.     bool    d_restoreOldCapture;        //!< true if the Window restores capture to the previous window when it releases capture.
  3730.     bool    d_zOrderingEnabled;            //!< true if the Window responds to z-order change requests.
  3731.     bool    d_wantsMultiClicks;         //!< true if the Window wishes to hear about multi-click mouse events.
  3732.     bool    d_distCapturedInputs;       //!< true if unhandled captured inputs should be distributed to child windows.
  3733.     bool    d_riseOnClick;              //!< True if the window should come to the front of the z order in respose to a left mouse button down event.
  3734.  
  3735.     // mouse button autorepeat data
  3736.     bool    d_autoRepeat;       //!< true if button will auto-repeat mouse button down events while mouse button is held down,
  3737.     float   d_repeatDelay;      //!< seconds before first repeat event is fired
  3738.     float   d_repeatRate;       //!< secons between further repeats after delay has expired.
  3739.     bool    d_repeating;        //!< implements repeating - is true after delay has elapsed,
  3740.     float   d_repeatElapsed;    //!< implements repeating - tracks time elapsed.
  3741.     MouseButton d_repeatButton; //!< Button we're tracking (implication of this is that we only support one button at a time).
  3742.  
  3743.     // Tooltip stuff
  3744.     String   d_tooltipText;     //!< Text string used as tip for this window.
  3745.     Tooltip* d_customTip;       //!< Possible custom Tooltip for this window.
  3746.     bool     d_weOwnTip;        //!< true if this Window created the custom Tooltip.
  3747.     bool     d_inheritsTipText; //!< true if the Window inherits tooltip text from its parent (when none set for itself).
  3748.  
  3749.     // rendering
  3750.     RenderCache d_renderCache;  //!< Object which acts as a cache for Images to be drawn by this Window.
  3751.     mutable bool d_needsRedraw;      //!< true if window image cache needs to be regenerated.
  3752.  
  3753.     // Look'N'Feel stuff
  3754.     String  d_lookName;         //!< Name of the Look assigned to this window (if any).
  3755.  
  3756. protected:
  3757.     /*************************************************************************
  3758.         Properties for Window base class
  3759.     *************************************************************************/
  3760.     static    WindowProperties::AbsoluteHeight    d_absHeightProperty;
  3761.     static    WindowProperties::AbsoluteMaxSize    d_absMaxSizeProperty;
  3762.     static    WindowProperties::AbsoluteMinSize    d_absMinSizeProperty;
  3763.     static    WindowProperties::AbsolutePosition    d_absPositionProperty;
  3764.     static    WindowProperties::AbsoluteRect        d_absRectProperty;
  3765.     static    WindowProperties::AbsoluteSize        d_absSizeProperty;
  3766.     static    WindowProperties::AbsoluteWidth        d_absWidthProperty;
  3767.     static    WindowProperties::AbsoluteXPosition    d_absXPosProperty;
  3768.     static    WindowProperties::AbsoluteYPosition    d_absYPosProperty;
  3769.     static    WindowProperties::Alpha                d_alphaProperty;
  3770.     static    WindowProperties::AlwaysOnTop        d_alwaysOnTopProperty;
  3771.     static    WindowProperties::ClippedByParent    d_clippedByParentProperty;
  3772.     static    WindowProperties::DestroyedByParent    d_destroyedByParentProperty;
  3773.     static    WindowProperties::Disabled            d_disabledProperty;
  3774.     static    WindowProperties::Font                d_fontProperty;
  3775.     static    WindowProperties::Height            d_heightProperty;
  3776.     static    WindowProperties::ID                d_IDProperty;
  3777.     static    WindowProperties::InheritsAlpha        d_inheritsAlphaProperty;
  3778.     static    WindowProperties::MetricsMode        d_metricsModeProperty;
  3779.     static    WindowProperties::MouseCursorImage    d_mouseCursorProperty;
  3780.     static    WindowProperties::Position            d_positionProperty;
  3781.     static    WindowProperties::Rect                d_rectProperty;
  3782.     static    WindowProperties::RelativeHeight    d_relHeightProperty;
  3783.     static    WindowProperties::RelativeMaxSize    d_relMaxSizeProperty;
  3784.     static    WindowProperties::RelativeMinSize    d_relMinSizeProperty;
  3785.     static    WindowProperties::RelativePosition    d_relPositionProperty;
  3786.     static    WindowProperties::RelativeRect        d_relRectProperty;
  3787.     static    WindowProperties::RelativeSize        d_relSizeProperty;
  3788.     static    WindowProperties::RelativeWidth        d_relWidthProperty;
  3789.     static    WindowProperties::RelativeXPosition    d_relXPosProperty;
  3790.     static    WindowProperties::RelativeYPosition    d_relYPosProperty;
  3791.     static    WindowProperties::RestoreOldCapture    d_restoreOldCaptureProperty;
  3792.     static    WindowProperties::Size                d_sizeProperty;
  3793.     static    WindowProperties::Text                d_textProperty;
  3794.     static    WindowProperties::Visible            d_visibleProperty;
  3795.     static    WindowProperties::Width                d_widthProperty;
  3796.     static    WindowProperties::XPosition            d_xPosProperty;
  3797.     static    WindowProperties::YPosition            d_yPosProperty;
  3798.     static    WindowProperties::ZOrderChangeEnabled    d_zOrderChangeProperty;
  3799.     static  WindowProperties::WantsMultiClickEvents d_wantsMultiClicksProperty;
  3800.     static  WindowProperties::MouseButtonDownAutoRepeat d_autoRepeatProperty;
  3801.     static  WindowProperties::AutoRepeatDelay   d_autoRepeatDelayProperty;
  3802.     static  WindowProperties::AutoRepeatRate    d_autoRepeatRateProperty;
  3803.     static  WindowProperties::DistributeCapturedInputs d_distInputsProperty;
  3804.     static  WindowProperties::CustomTooltipType d_tooltipTypeProperty;
  3805.     static  WindowProperties::Tooltip           d_tooltipProperty;
  3806.     static  WindowProperties::InheritsTooltipText d_inheritsTooltipProperty;
  3807.     static  WindowProperties::RiseOnClick       d_riseOnClickProperty;
  3808.     static  WindowProperties::VerticalAlignment   d_vertAlignProperty;
  3809.     static  WindowProperties::HorizontalAlignment d_horzAlignProperty;
  3810.     static    WindowProperties::UnifiedAreaRect    d_unifiedAreaRectProperty;
  3811.     static    WindowProperties::UnifiedPosition    d_unifiedPositionProperty;
  3812.     static    WindowProperties::UnifiedXPosition    d_unifiedXPositionProperty;
  3813.     static    WindowProperties::UnifiedYPosition    d_unifiedYPositionProperty;
  3814.     static    WindowProperties::UnifiedSize        d_unifiedSizeProperty;
  3815.     static    WindowProperties::UnifiedWidth        d_unifiedWidthProperty;
  3816.     static    WindowProperties::UnifiedHeight        d_unifiedHeightProperty;
  3817.     static    WindowProperties::UnifiedMinSize    d_unifiedMinSizeProperty;
  3818.     static    WindowProperties::UnifiedMaxSize    d_unifiedMaxSizeProperty;
  3819.  
  3820.  
  3821.     /*************************************************************************
  3822.         implementation functions
  3823.     *************************************************************************/
  3824.     /*!
  3825.     \brief
  3826.         Add standard CEGUI::Window events
  3827.     */
  3828.     void    addStandardEvents(void);
  3829.  
  3830.     /*!
  3831.     \brief
  3832.         Cleanup child windows
  3833.     */
  3834.     virtual void    cleanupChildren(void);
  3835.  
  3836.     /*!
  3837.     \brief
  3838.         Add given window to child list at an appropriate position
  3839.     */
  3840.     virtual void    addChild_impl(Window* wnd);
  3841.  
  3842.     /*!
  3843.     \brief
  3844.         Remove given window from child list
  3845.     */
  3846.     virtual void    removeChild_impl(Window* wnd);
  3847.  
  3848.     /*!
  3849.     \brief
  3850.         Notify 'this' and all siblings of a ZOrder change event
  3851.     */
  3852.     virtual void    onZChange_impl(void);
  3853.  
  3854.  
  3855.     /*!
  3856.     \brief
  3857.         Add standard CEGUI::Window properties.
  3858.     */
  3859.     void    addStandardProperties(void);
  3860.  
  3861.  
  3862.     /*!
  3863.     \brief
  3864.         Implements move to fron behavior.
  3865.      */
  3866.     virtual void moveToFront_impl(bool wasClicked);
  3867.  
  3868.  
  3869.     /*!
  3870.     \brief
  3871.         Implementation of rise on click functionality.
  3872.      */
  3873.     void doRiseOnClick(void);
  3874.  
  3875.     
  3876.     /*!
  3877.     \brief
  3878.         Implementation method to modify window area while correctly applying min / max size processing, and
  3879.         firing any appropriate events.
  3880.  
  3881.     /note
  3882.         This is the implementation function for setting size and position.
  3883.         In order to simplify area management, from this point on, all modifications to window size and
  3884.         position (area rect) should come through here.
  3885.  
  3886.     /param pos
  3887.         UVector2 object describing the new area position.
  3888.  
  3889.     /param size
  3890.         UVector2 object describing the new area size.
  3891.  
  3892.     /param topLeftSizing
  3893.         - true to indicate the the operation is a sizing operation on the top and/or left edges of the area,
  3894.             and so window movement should be inhibited if size is at max or min.
  3895.         - false to indicate the operation is not a strict sizing operation on the top and/or left edges and
  3896.             that the window position may change as required
  3897.     
  3898.     /param fireEvents
  3899.         - true if events should be fired as normal.
  3900.         - false to inhibit firing of events (required, for example, if you need to call this from
  3901.             the onSize/onMove handlers).
  3902.      */
  3903.     void setWindowArea_impl(const UVector2& pos, const UVector2& size, bool topLeftSizing = false, bool fireEvents = true);
  3904.  
  3905.     /*!
  3906.     \brief
  3907.         Add the given window to the drawing list at an appropriate position for it's settings and the
  3908.         required direction.  Basically, when \a at_back is false, the window will appear in front of
  3909.         all other windows with the same 'always on top' setting.  When \a at_back is true, the window
  3910.         will appear behind all other windows wih the same 'always on top' setting.
  3911.  
  3912.     \param wnd
  3913.         Window object to be added to the drawing list.
  3914.  
  3915.     \param at_back
  3916.         Indicates whether the window should be placed at the back of other windows in the same group.
  3917.         If this is false, the window is place in front of other windows in the group.
  3918.  
  3919.     \return
  3920.         Nothing.
  3921.     */
  3922.     void addWindowToDrawList(Window& wnd, bool at_back = false);
  3923.  
  3924.     /*!
  3925.     \brief
  3926.         Removes the window from the drawing list.  If the window is not attached to the drawing list
  3927.         then nothing happens.
  3928.  
  3929.     \param wnd
  3930.         Window object to be removed from the drawing list.
  3931.  
  3932.     \return
  3933.         Nothing.
  3934.     */
  3935.     void removeWindowFromDrawList(const Window& wnd);
  3936.  
  3937.     virtual int writePropertiesXML(OutStream& out_stream) const;
  3938.     virtual int writeChildWindowsXML(OutStream& out_stream) const;
  3939.     
  3940.     /*************************************************************************
  3941.         May not copy or assign Window objects
  3942.     *************************************************************************/
  3943.     Window(const Window& wnd) {}
  3944.     Window& operator=(const Window& wnd) {return *this;}
  3945.  
  3946.     /*************************************************************************
  3947.         Private implementation Data
  3948.     *************************************************************************/
  3949.     const String    d_type;            //!< String holding the type name for the Window (is also the name of the WindowFactory that created us)
  3950.     String    d_name;                    //!< The name of the window (GUI system unique).
  3951.     String    d_falagardType;       //!< Type name of the window as defined in a Falagard mapping.
  3952. };
  3953.  
  3954. } // End of  CEGUI namespace section
  3955.  
  3956.  
  3957. #if defined(_MSC_VER)
  3958. #    pragma warning(pop)
  3959. #endif
  3960.  
  3961. #endif    // end of guard _CEGUIWindow_h_
  3962.